I tried to run basic Xamarin.Forms application on my device (Android 7.1) and got the following error:
error MSB6006: "java.exe" exited with code -1073740791.
How to fix this error, or just figure out what't wrong? Multi-Dex flag is enabled. Java version: 1.8.0_131
Full build log:
1> Processing: obj\Debug\res\layout\tabbar.xml
1> Processing: obj\Debug\res\layout\toolbar.xml
1> Processing: obj\Debug\res\values\styles.xml
1> Processing: obj\Debug\res\layout\tabbar.xml
1> Processing: obj\Debug\res\layout\toolbar.xml
1> Processing: obj\Debug\res\values\styles.xml
1> Processing: obj\Debug\res\layout\tabbar.xml
1> Processing: obj\Debug\res\layout\toolbar.xml
1> Processing: obj\Debug\res\values\styles.xml
1> error MSB6006: "java.exe" exited with code -1073740791.
Make sure that your Android SDK version is latest and all the Build Tools are updated.
Another important fact to look at is the version of Proguard in your android-sdk folder, because Google no longer updates Proguard with Android SDK.
So the solution is to update your proguard version manually.
Download the latest version from https://sourceforge.net/projects/proguard/files/proguard/
Extact it, and replace the new proguard folder with the old proguard folder in [sdkpath]/tools/proguard
It is suggested to make the backup of the old proguard folder by renaming it into something like proguard-old, and copying the new proguard5.3.3 folder as proguard.
How about try Change Java Max Heap Size to 1G?
Android sdk reinstallation resolved my problem