Online installed Android Qt 6.6 but build requires newer version?
-
@shokarta First, your JDK version 21 may not work(not sure). Even for the latest Android 14, Java 17 is needed. But you have 21. My target Android versions are 12/13. Therefore, I use Java 11.
Android Java API and language features supported 14 (API 34) 17 Core libraries 13 (API 33) 11 Core libraries 12 (API 32) 11 Java API 11 and lower Android versions
Better to check the versions of all the packages you use are compatible.
-
-
JDK 17 or 11 did not help,
however what i did is changed version of androidx.core:core in projectfolder/android/build.gradle on line 21:from:
implementation 'androidx.core:core:1.10.1'
to:
implementation 'androidx.core:core:1.8.0'
thos i didnt try any versions in between like 1.9.0, i tried directly 1.8.0 which worked...
hope this help someone as Qt 6.6 for me does not like to use API 33
-
-
little update...
above solution works only with JDK 17... but also removing the line completly works with JDK 17... however if i update back to 21 (like the QT installation video from the link above) then nothing works whatsoever...
i guess only updating API to 33 would work, which from the issue explanation my Qt 6.6 does not like. -
-
@shokarta I also had the same issue.
The following worked for me-- Install Android Build Platform SDK - android-34 from SDK manager.
- Install Android Build tools version - 34.0.0 rc3 from SDK manager.
- Install OpenJDK 17 (and not higher versions - they are not compatible)
- Restart Qt Creator.
- Set JDK path.
- Set Android Build tools version as 34.0.0 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
- Set Android Build Platform SDK as android-34 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
- Clean, Rebuild
-
I had the same issue, I am currently on Qt 6.5.3, I just replace the JDK 21 with JDK 17 and it worked
-
-
I just want to make it clear for new readers : with current (Qt 6.6, QtCreator 12.0.2) version, you have to do both :
- use JDK 17 not 21
- modify your projectfolder/android/build.gradle as stated :
implementation 'androidx.core:core:1.8.0'
instead of
implementation 'androidx.core:core:1.10.1'
Not doing any of these lead to errors in my case.
The error when using Jdk 21 contains :javac\debug\classes\org\qtproject\qt\android\bindings\QtLoader$2.class: D8: java.lang.NullPointerException
-
@Samuel-Adesola said in Online installed Android Qt 6.6 but build requires newer version?:
I had the same issue, I am currently on Qt 6.5.3, I just replace the JDK 21 with JDK 17 and it worked
This solved the same issue I had on Qt 6.6.2.
-
@simranjeetsingh
Hii!!
I I'm having trouble building my Android app with QT 6.6.1. Despite installing JDK 11 and configuring Android 13 (API 33), I keep getting an error stating that a drawable/icon is not found, even though I've added it to my build directory. Additionally, I'm getting warnings about deprecated Gradle features, making the build incompatible with Gradle 9.0.Could You please help me troubleshoot this issue? I've attached a screenshot for reference.
-
Hi all,
while i am trying the android camera facing below error, @i.e.. unable to get the preview of stream.
using Android 14
sdk version34
ndk 26
java 17jdk
Qt version 6.5.3W QtCamera2: Failed to start preview:android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:1948: The camera device has been disconnected
-
@iSolve_Tech You are asking in a solved thread something that has nothing to do with the threads topic