Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urgent: "java.exe" exited with code 2 #249

Closed
supreettare opened this issue Apr 29, 2017 · 12 comments

Comments

@supreettare
Copy link

commented Apr 29, 2017

Installing the latest nugets from Mobile Center
Microsoft.Azure.Mobile
Microsoft.Azure.Mobile.Analytics
Microsoft.Azure.Mobile.Crashes

Breaks Xamarin Forms android with error "java.exe" exited with code 2

Please can we have a fix or work around on urgent basis, I have a release pending.

@guperrot

This comment has been minimized.

Copy link
Member

commented May 1, 2017

Hi, are you using Java 8 which is a requirement for our product?

If yes we need much more details from the build log. if not you have to upgrade your build to use Java 8.

Please enable diagnostic level on build output and provide the build error details.
https://forums.xamarin.com/discussion/27515/how-to-obtain-diagnostic-build-logs

Also we have a support center that we recommend using in our README instead for issues like this so that we can notice it sooner.

@guperrot

This comment has been minimized.

@guperrot

This comment has been minimized.

Copy link
Member

commented May 5, 2017

Short answer: you need to enable "Multi-Dex" in build options.

@guperrot

This comment has been minimized.

Copy link
Member

commented May 8, 2017

@supreettare Feel free to reopen the issue if enabling Multi-dex does not work.

@guperrot guperrot closed this May 8, 2017

@brad007

This comment has been minimized.

Copy link

commented May 17, 2017

Enabling multidex did solve this problem

@kntiwary

This comment has been minimized.

Copy link

commented May 19, 2017

@guperrot

This comment has been minimized.

Copy link
Member

commented May 19, 2017

@kntiwary are you sure you enabled multi-dex ? What build config are you using and what are your build options?

@guperrot guperrot reopened this May 19, 2017

@guperrot guperrot closed this May 19, 2017

@guperrot

This comment has been minimized.

Copy link
Member

commented May 19, 2017

Closed as #249 (comment) is followed up in #309

@morokolo

This comment has been minimized.

Copy link

commented Oct 1, 2018

Another thing to look out for, is the Android Package signing options. I had a project referencing another developers Keystore. Updating the path or unchecking the Sign the .apk file ..... helps

@EeKay

This comment has been minimized.

Copy link

commented Apr 2, 2019

Also, check if the SDK version in the Android Build configuration is set to the right version. ie: when you are targeting 8.X in your Xamarin android project, you need to set the SDK Version to Xamarin.Android 8.x instead of Xamarin.Android 9.x

@liamomg

This comment has been minimized.

Copy link

commented Apr 10, 2019

Does anyone know why enabling multi-dex fixed the issue?

As there is a post saying you dont have to if your minimum SDK version is 21.

If your Android app aims for a minimum SDK version above or equal to API 21 (Android 5.0 Lollipop) it is not necessary to use the MultiDex library, because the OS handles natively the extra .dex files. However, if for compatibility reasons the developer wants to support older Android OS, then he/she should use the MultiDex library.

https://riptutorial.com/xamarin-android/example/29859/enabling-multidex-in-your-xamarin-android-apk

@DrTJ

This comment has been minimized.

Copy link

commented Apr 16, 2019

Updating VS Mac, All Nuget Packages and installing/updating the Android Build Tools solved the problem for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.