1

When i create an empty project and click build to my android phone, i face this problem

"java.exe" exited with code 1

and in output tab i see this messages Click to see Output error

i trying to do these things :

  • change java MAX Heap Size to 1G from : Project > App Properties > Android Options > Advanced
  • install java JDK 1.8.0_102 and change location from 1.7 to 1.8.0_102 from : Tools > Options > Xamarin > Android Setting > Java Development Kit Location
  • Clear Solution and re-build

i'm using Visual studio 2015 Enterprise and my phone is Samsung Alpha

please help me to solve this error

Ammar Midani
  • 55
  • 1
  • 11
  • Change Location to Java v 1.7 32 Bit – Gaurav P Oct 21 '16 at 13:35
  • 1
    @GauravKP SDK 7 requires Java 1.8. Ammar Midani do as the log says and look at the full log to see the exception: http://asish.com.au/xamarin-logs-visual-studio/ – Gusman Oct 21 '16 at 13:38
  • @Gusman Xamarin need Java 1.7 https://developer.xamarin.com/guides/android/getting_started/installation/windows/manual_installation/ – Gaurav P Oct 21 '16 at 13:41
  • @GauravKP nope, latest update requires Java 1.8: https://blog.xamarin.com/xamarin-android-7-0-now-with-more-nougat/ – Gusman Oct 21 '16 at 13:42
  • @GauravKP that doesn't means nothing, the minimum deploy target is independant of the SDK version you use. If the OP installed the latest SDK then it reqires Java 1.8. – Gusman Oct 21 '16 at 13:45
  • it's not helping @GauravKP – Ammar Midani Oct 21 '16 at 15:17

2 Answers2

2

Clear your obj and bin folder for both projects. (PCL and Android).

If you're using a custom proguard tool, verify the file encoding is in utf or Ascii.

Olorunfemi Davis
  • 1,001
  • 10
  • 23
1

I have faced this kinds of problem.in my case it was "java.exe" exited with code 2.simply i just Checked Enable Multi-Desk and solved my problem.