Forum Xamarin.Android

Getting error "java.exe exited with code 2"

RonNYCRonNYC Member ✭✭✭

I turned Multi-Dex on.

I did not get this error yesterday.

I made no changes to the app at all.

I deleted the bin and obj folders. I restarted the computer (Windows 10 enterprise).

I even put on a new shirt. Nothing seems to work.

What does this error mean in a Xamarin project? Where do I look?



  • AmmarMheirAmmarMheir USMember, Forum Administrator, Xamarin Team Xamurai

    There are numerous reasons why this error could occur.

    It's good to make sure that Visual Studio is up to date as well as the Android SDK, Built-Tools and Platforms Tools. The Android components can be updated from the SDK Manager.

    You could then attempt changing the Android Target Framework as certain packages or other native libraries could have specific target frameworks in which they support.

    You can try nnloading the Xamarin.Andrid project and editing the .csproj to see if the appropriate tag is set to enable MultiDex:


    The build logs can typically provide additional information as to the reason behind this error, it might be good to sift through the build logs to find any other errors being logged earlier in the build process.

Sign In or Register to comment.