Forum General

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

MSB6006: "java.exe" exited with code 1

I'm not able to resolve Java.exe exited with code 1 error in visual studio 2017. V 15.9.23

Below steps tried to resolve this error. But no LUCK!

  1. Enable proGuard - checkbox checked and entered 1G
  2. Created ProGuard.cfg file and copied all the bin folder.
  3. Java development kit properly installed and referenced properly in JDK location.
  4. Downloaded new proGuard files from website and replaced in workplace folder.

I don't know what I'm missing here. I've tried all the solution given previous forums. But not able to resolve this issue.
When I build solution no error, Only deploying this issue occurred. Please help me to solve this issue.

Build output log:

1>------ Build started: Project: AppAnd, Configuration: Release Any CPU ------
1> AppAnd -> C:\Users\balaji\source\repos\AppAnd\AppAnd\bin\Release\AppAnd.dll
2>Starting deployment to pixel_xl ...
2>Deploying to pixel_xl ...
2>Build started.
2>Project "AppAnd.csproj" (Install target(s)):
2>C:\Program Files\Java\jdk1.8.0_202\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\balaji\AppData\Local\Xamarin\Mono for Android\debug.keystore"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\30.0.0\zipalign.exe 4 "C:\Users\balaji\source\repos\AppAnd\AppAnd\obj\Release\90\android\bin\AppAnd.AppAnd.apk" "bin\Release\AppAnd.AppAnd-Signed.apk"
2>C:\Program Files\Java\jdk1.8.0_202\bin\java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\30.0.0\lib\apksigner.jar" sign --ks "C:\Users\balaji\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 26 --max-sdk-version 28 C:\Users\balaji\source\repos\AppAnd\AppAnd\bin\Release\AppAnd.AppAnd-Signed.apk
2>MSB6006: "java.exe" exited with code 1.
2>Done building project "AppAnd.csproj" -- FAILED.
2>Build FAILED.
2>Deployment failed to pixel_xl.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Posts

  • sonMMsonMM Member ✭✭

    I think you should restart your visual studio and check the connection between your computer and debugdevice.This cause when can't deploy to debug device

Sign In or Register to comment.