Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt 5.6 with Android Studio (embedded JDK)
I'm configuring Qt 5.6.2 on my new debian 8 installation.
I just installed the latest Android Studio 2.3.1 that has JDK embedded on the package.
Then from the package manager I installed NDK.
From Qt Creator I configured Android as:
JDK location: /home/luca/android-studio/jre Android SDK location: /home/luca/Android/Sdk Android NDK location: /home/luca/Android/Sdk/ndk-bundle
The problem is when I build, at the end of compilation I get:
:compileReleaseJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileReleaseJava'. > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
In my previous linux system I've never set JAVA_HOME and all worked fine...
Where do I wrong with Debian?
This is the path to the Java JRE not JDK. JRE does not contain the compiler.
Change the path, so it points to the JDK.
Then new Android Studio cames with a full JDK and it put all in /jre . It also contains javac ecc...
Ok, it seems Android Studio embed OpenJDK 8 in its /jre folder but Qt Creator (Qt 5.6.2) can't use it.
To solve I installed OpenJDK 8 on my system and configured Qt Creator as:
JDK location: /usr/lib/jvm/java-1.8.0-openjdk-amd64