question

teja-0698 avatar image
0 Votes"
teja-0698 asked LeonLu-MSFT commented

Xamarin Forms application error MSB6006: "java.exe" exited with code 2.

Hi All,

I'm getting the below error in VS2019 when trying to debug a Xamarin Forms app on Android emulator.

MSB6006: "java.exe" exited with code 2.

197802-capture.png


dotnet-xamarin
capture.png (35.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I find a similar thread in GitHub about this error.
You can try to enable Multi-Dex( right click your android project folder in VS, select properties. choose Android Options, select Multi-Dex), after that, rebuild & clean (delete all bin\obj manually). If this issue will disappear.

If this issue is still existed, please update your VS 2019 to the latest, can you share a full build log?

0 Votes 0 ·

0 Answers