2

I'm not able to build app for android because I get a Warning:

Failed to get the Java SDK version as it does not appear to contain a valid version number. javac -version returned: ```java version "10" 2018-03-20.

and an Error:

Error MSB4044: The "AdjustJavacVersionArguments" task was not given a value for the required parameter "JdkVersion".

It was fine before I downloaded newer version of Java, jdk-10. The old version which seem to be working was jdk-1.8.

1 Answers1

1

Make sure that you have the right path of JDK in the Android Settings tab, on Windows should be something like: C:\Program Files\Java\jdk1.8.0_152

Hichame Yessou
  • 2,658
  • 2
  • 18
  • 30
  • I've Mac, the default path for JDK is `/usr` and on the right side of the input text field there's a green tick saying 'Found'. – Suraj Sirohi Mar 30 '18 at 14:45
  • 1
    That's the symbolic link, try /usr/libexec/java_home -V to have the right path, if there is something wrong the fastest option is to delete properly the JDK installation (https://stackoverflow.com/questions/19039752/removing-java-8-jdk-from-mac) and reinstall it, exporting the version you need. – Hichame Yessou Mar 30 '18 at 20:00
  • 1
    yes, I had to select the 'home' folder, it works now, thank you. – Suraj Sirohi Mar 31 '18 at 10:18