This has me pulling my hair out..
We have a project that works fine in debug or adhoc(release) when built and deployed using Visual Studio. But when we build it from the command line (msbuild as part of cake script) it just repeats the following log output:
D/ResourcesManager(24055): For user 0 new overlays fetched Null
I/MultiDex(24055): VM with version 2.1.0 has multidex support
I/MultiDex(24055): install
I/MultiDex(24055): VM has multidex support, MultiDex support library is disabled.
W/monodroid(24055): Creating public update directory: `/data/user/0/<AppName>/files/.__override__`
W/monodroid(24055): Using override path: /data/user/0/<AppName>/files/.__override__
W/monodroid(24055): Trying to load sgen from: /data/user/0/<AppName>/files/.__override__/libmonosgen-2.0.so
W/monodroid(24055): Trying to load sgen from: /storage/emulated/0/Android/data/<AppName>/files/.__override__/libmonosgen-2.0.so
W/monodroid(24055): Trying to load sgen from: /storage/emulated/0/../legacy/Android/data/<AppName>/files/.__override__/libmonosgen-2.0.so
W/monodroid(24055): Trying to load sgen from: /data/app/<AppName>-1/lib/arm/libmonosgen-2.0.so
W/monodroid(24055): Trying to load sgen from: /data/user/0/<AppName>/files/.__override__/links/libmonosgen-2.0.so
A/monodroid(24055): No assemblies found in '/data/user/0/<AppName>/files/.__override__' or '/storage/emulated/0/Android/data/<AppName>/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...
On one device it just loops with the splash screen visible spitting this out forever, on another device it does 3 iterations (with splash flashing visible) and then stops trying and the app crashes.
I've checked that fast deployment/android shared runtime are disabled. I've tried multiple different settings in the csproj file.
relevant parts of project file (I think):
<Project>
...
<PropertyGroup>
...
<AndroidApplication>true</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
<AndroidEnableMultiDex>true</AndroidEnableMultiDex>
<JavaOptions />
...
<PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
</PropertyGroup>
...
</Project>
And here is how I call it from my cake script
MSBuild(androidProject, settings => settings
.SetConfiguration(configuration)
.WithProperty("Platform", "AnyCPU")
.SetVerbosity(Verbosity.Verbose)
.WithProperty("AndroidKeyStore", "true")
.WithProperty("AndroidSigningStorePass", aksPassword)
.WithProperty("AndroidSigningKeyStore", androidKeyStoreFile)
.WithProperty("AndroidSigningKeyAlias", androidKeystoreAlias)
.WithProperty("AndroidSigningKeyPass", aksPassword)
//.WithProperty("DebugSymbols", "true")
.WithTarget("SignAndroidPackage")
.WithTarget("Build")
.WithProperty("OutputPath", System.IO.Path.Combine(buildDir, "android"))
.WithProperty("TreatWarningsAsErrors","false"));
I've been searching the web and changing settings/rebuilding all day with no progress.
(This is a Xamarin.Forms app, but I'm posting in Android because I don't think the issue is specific to that)