appcenter android build with multidex

I have my appcenter android build setup and working well. Recently I added a package Xamarin.Forms.AppLinks to enable deep linking in app and my local VS build failed with error 'error MSB6006: "java" exited with code 2". After some research I enabled Multi-Dex option for android project and it fixed the issue.

But Appcenter android build is still failing with same below error. Not sure if appcenter is ignoring this settings. Has anyone had experience compiling appcenter android build with multidex enabled?

"/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj" (PackageForAndroid target) (1) ->
(ResolveAssemblyReferences target) ->
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2130,5): warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj]

"/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj" (PackageForAndroid target) (1) ->
(ResolveCodeAnalysisRuleSet target) ->
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Microsoft.CSharp.CurrentVersion.targets(141,9): warning MSB3884: Could not find rule set file "MinimumRecommendedRules.ruleset". [/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj]

"/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj" (PackageForAndroid target) (1) ->
(_CompileToDalvikWithDx target) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2721,3): error MSB6006: "java" exited with code 2. [/Users/vsts/agent/2.154.3/work/1/s/src/Mobile/CareNavigator.Android/CareNavigator.Android.csproj]

17 Warning(s)
1 Error(s)

Time Elapsed 00:01:31.54

[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/5_18_2/bin/msbuild' failed with exit code 1


  • asanchezasanchez Member

    I have compiled with multidex in the past in AppCenter. I'm having the same error now, though. Have you compiled locally?

  • asanchezasanchez Member

    Are you using the latest VS 2019 version?

  • pbijvanipbijvani Member ✭✭

    I am using VS 2017 and locally it works fine with multidex enabled. It doesnt compile in appcenter.

Sign In or Register to comment.