Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 30571 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Please find in attached zip file ( at URL http://statics.romcyber.com/BuildTestApp.zip ) an example of projects reproducing the bug.
The problem occurs when we add a library to a project.
(_ValidateAndroidPackageProperties target) -> C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(411,2): error : AndroidManifest file does not exist [C:\Users\romain.flechner\Documents\Projects\BuildTestApp\BuildTestApp.Lib\BuildTestApp.Lib.fsproj]
You can try with commands in build.txt included in zip file.
MSBuild.exe BuildTestApp.fsproj /t:PackageForAndroid /m /p:RestorePackages="False" /p:OutputPath="C:\Users\romain.flechner\Documents\Projects\BuildTestApp\build" /p:Configuration="Release" /p:AndroidManifest="Properties\AndroidManifest.armeabi-v7a.xml" /p:AndroidSupportedAbis="armeabi-v7a"
Change the output path in command line.
When I remove the library project, the build works
We found a solution:
Xamarin.Android.Common.targets has a bug.
replace line 408
<CreateProperty Value="$(ProjectDir)$(AndroidManifest)" Condition="'$(AndroidManifest)' != ''">
by <CreateProperty Value="$(ProjectDir)$(AndroidManifest)" Condition="'$(AndroidManifest)' != '' And '$(AndroidApplication)' ==True">
Can you integrate this fix in a next release of Xamarin ?
I read the documentation explaining how to build ABI specific apks:
The documentation suggested to use Rake or Fake (http://fsharp.github.io/FAKE/)
So I developed a Fake module to script ABI specific apks builds.
You can see my fork here: https://github.com/rflechner/FAKE/commits/AbiSpecific
I am waiting for the fix of Xamarin.Android.Common.targets to create a pull request.
Should it be possible to check the quick fix I proposed 6 weeks ago or just have a reply ?
I'll take a look at this issue for you, I have managed to replicate the problem using the test project attached. I'm not 100% sure at the moment that your suggested fix will have any knock on side effects on Library projects, but I will investigate and see if we can find a solution.
In the mean time a work around would be to place the definitions for the AndroidManifest into the cs/fsproj file like so
<AndroidManifest Condition=" '$(AndroidSupportedAbis)' == 'armeabi-v7a''">Properties\AndroidManifest.armeabi-v7a.xml</AndroidManifest>
<AndroidManifest Condition=" '$(AndroidManifest)' == ''">Properties\AndroidManifest.xml</AndroidManifest>
You can see I'm using conditionals to pick the right Manifest File. Note you can also use the following style of conditional as well
Condition=" ($(AndroidSupportedAbis.Contains('arm64-v8a')) Or $(AndroidSupportedAbis.Contains('x86_64')))"
This works on both msbuild and xbuild.
Then you can just setup your build system to pass in the
parameter for each type of supported abi you are after.
The inconvenience of this solution is I have to rewrite the fsproj to add the conditions.
I think FAKE don't have to modify fsproj.
I can try to rewrite the original AndroidManifest directly for each build and rollback it after, but I find it a little hazardous.
For your information, my pull request with this solution is merged: