Mobile compilation problem with JAVA version
-
Hi guys,
I've a problem with mobile compilation.
In any project I've this errors:11:47:40: Initializing deployment to Android device/simulator 11:47:40: Deploying to 11:47:40: Running steps for project provaAndroid... 11:47:40: Starting: "/home/stefano/.Qt/Tools/CMake/bin/cmake" --build /home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug --target all [1/1 420.2/sec] Copying provaAndroid binary to apk folder 11:47:40: The process "/home/stefano/.Qt/Tools/CMake/bin/cmake" exited normally. 11:47:40: Starting: "/home/stefano/.Qt/6.4.1/gcc_64/bin/androiddeployqt" --input /home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug/android-provaAndroid-deployment-settings.json --output /home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug/android-build --android-platform android-32 --jdk /usr/lib/jvm/java-8-openjdk-amd64 --gradle Generating Android Package Input file: /home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug/android-provaAndroid-deployment-settings.json Output directory: /home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug/android-build/ Application binary: provaAndroid Android build platform: android-32 Install to device: No -- Skipping /home/stefano/.Qt/6.4.1/android_x86_64/plugins/iconengines/libplugins_iconengines_qsvgicon_x86_64.so. It has unmet dependencies: lib/libQt6Svg_x86_64.so. -- Skipping /home/stefano/.Qt/6.4.1/android_x86_64/plugins/imageformats/libplugins_imageformats_qsvg_x86_64.so. It has unmet dependencies: lib/libQt6Svg_x86_64.so. FAILURE: Build failed with an exception. * Where: Build file '/home/stefano/build-provaAndroid-Android_Qt_6_4_1_Clang_x86_64-Debug/android-build/build.gradle' line: 17 * What went wrong: A problem occurred evaluating root project 'android-build'. > Failed to apply plugin 'com.android.internal.application'. > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. Your current JDK is located in /usr/lib/jvm/java-8-openjdk-amd64/jre You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing `org.gradle.java.home` in `gradle.properties`. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 629ms Building the android package failed! -- For more information, run this command with --verbose. 11:47:41: The process "/home/stefano/.Qt/6.4.1/gcc_64/bin/androiddeployqt" exited with code 14. Error while building/deploying project provaAndroid (kit: Android Qt 6.4.1 Clang x86_64) When executing step "Build Android APK" 11:47:41: Elapsed time: 00:01.
This is the compilation of a clean QtQuick project.
I already set JAVA_HOME to correct path:
but continue to have this error:> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. Your current JDK is located in /usr/lib/jvm/java-8-openjdk-amd64/jre
I suspect that there is another place to change this path, but I don't where go to see.
Can you help me?
Thanks.Stefano
-
@JoeCFD Hi and thanks for your help.
As I already wrote, I've already installed Java 11 and changed JAVA_HOME path in Qt environment, but I cotinue to have this error and I don't know where I can change configuration for Gradle. -
@JoeCFD Hi and thanks for your help.
As I already wrote, I've already installed Java 11 and changed JAVA_HOME path in Qt environment, but I cotinue to have this error and I don't know where I can change configuration for Gradle. -
@jsulm Hi, yes, this is first thing that I did.
Now I purged 1.8 version too, as reccomended by joeCFD, but at the moment I've another compilation problem and I have to fix this first. -
@jsulm Hi, yes, this is first thing that I did.
Now I purged 1.8 version too, as reccomended by joeCFD, but at the moment I've another compilation problem and I have to fix this first.I solved the compilation problem and with purge of old java version all works fine :)
Thanks a lot at all for help :)