Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

"java.exe" exited with code 2

$
0
0

Ive just upgraded to the latest version 2.0.0.6482 of Xamarin.Forms and Mpas etc, and V26.0.0 of googleplayservices.

Now my compile is failing with the above error.

When I look at the diagnostic build output the error is: trouble writing output: Too many field references: 70904; max is 65536. as seen on the bottom of this:
Task "CompileToDalvik"
CompileToDalvik
JavaOptions:
JavaMaximumHeapSize: 1G
ClassesOutputDirectory: obj\Debug\android\bin\classes
JavaToolPath: C:\Program Files (x86)\Java\jdk1.7.0_71\bin
DxJarPath: C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.0\lib\dx.jar
ToolExe: java.exe
ToolPath:
UseDx: False
MultiDexEnabled: False
JavaLibrariesToCompile:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\mono.android.jar
E:\MSIV2012\TFH\UI\V2\TFH.UI.2.1\Xamarin.App\Xamarin.App.Android\obj\Debug__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\libs\internal_impl-23.0.1.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\libs\internal_impl-23.0.1.jar
C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.RecyclerView\23.0.1.3\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Ads\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Analytics\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppIndexing\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppInvite\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppState\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Base\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Cast\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Drive\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Fitness\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Games\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Gcm\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Identity\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Location\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Maps\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Nearby\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Panorama\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Plus\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.SafetyNet\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Vision\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Wallet\26.0.0\embedded\classes.jar
C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Wearable\26.0.0\embedded\classes.jar
C:\Program Files (x86)\Java\jdk1.7.0_71\bin\java.exe -Xmx1G -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.0\lib\dx.jar" --no-strict --dex --output=obj\Debug\android\bin obj\Debug\android\bin\classes "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\mono.android.jar" E:\MSIV2012\TFH\UI\V2\TFH.UI.2.1\Xamarin.App\Xamarin.App.Android\obj\Debug__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\libs\internal_impl-23.0.1.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.AppCompat\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.CardView\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\libs\internal_impl-23.0.1.jar C:\Users\mgwalm\AppData\Local\Xamarin\Android.Support.v7.RecyclerView\23.0.1.3\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Ads\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Analytics\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppIndexing\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppInvite\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.AppState\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Base\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Cast\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Drive\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Fitness\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Games\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Gcm\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Identity\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Location\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Maps\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Nearby\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Panorama\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Plus\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.SafetyNet\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Vision\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Wallet\26.0.0\embedded\classes.jar C:\Users\mgwalm\AppData\Local\Xamarin\GooglePlayServices.Wearable\26.0.0\embedded\classes.jar

trouble writing output: Too many field references: 70904; max is 65536.
You may try using --multi-dex option.


Firstly I don't have a reference to all the above GooglePlayServices, only the base and anything to do with mapping and location.
Yet they are all included in this build.

But, how do I overcome this problem?


Viewing all articles
Browse latest Browse all 91519

Trending Articles