0

When I install both Xamarin.Firebase.AppIndexing and Xamarin.Firebase.Analytics in my Xamain.Andriod project, the build is always failed.

The build output

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2068,3): error MSB6006: "java.exe" exited with code 2.

If I uninstall AppIndexing or Analytics, the solution can be built again.

Can anyone help me to solve it? Thanks!

Derrick
  • 3,669
  • 5
  • 35
  • 50
Wayne Gu
  • 1
  • 1

1 Answers1

1

[edit: simply go to Android Properties, Android Options, Packaging tab then check "Enable Multi-Dex. And in the Advanced tab under "Java Max Heap Size" type 1G]

most probably it is caused by this,
"trouble writing output: Too many field references: 70185; max is 65536. You may try using --multi-dex option." when building Android project
you passed the limit!

this one explains it well too: http://www.telerik.com/forums/java-exe-exited-with-code-2