How on Ot6 compile for Android
-
If I use jdk 11, then I get error: fro SDK not higher 26 need jdk only 1.8. And build not work.
orAndroid build SDK version is not defined. Check Android settings.
-
@Mihaill said in How on Ot6 compile for Android:
My android device use arm cpu
But the build is on your PC, not the device, right?
You should check your Android Kit - are there any warnings/errors? -
@Mihaill There were a couple of mayor changes in Android/gradle between SDK versions, Qt6 uses a much newer version of android/gradle than qt5 does.
I would suggest, creating a simple qt android project using Qt6, use QtCreator do create default android templates.
See if that compiles (I assume it will) check the difference in the android template files and change your existing one accordingly.
-
I change options, use jdk 11 and now get only 1 error: importing a package requires a version number
-
The deployment device "SM-N9810" is disconnected.
But I use else phone. End I can't select device, when push build.
-
I might not know from the description the exact problem, but you could try this.
- Select in Qt Creator your project (if not already selected). E.g. select Edit on left, then Projects, select your project, right-click on top of it and select "Set [your project] as active project"
- Then go on the bottom-left corner where you see the icons: Hammer (Build project [your project]), Green arrow with a bug (Start debugging of startup..), Green arrow (Run) and Android phone with a green dot/ball - left-click the last one with mouse
- Now you see Device (top-left) and on it's right some device name (the device to run the applications on) and on far right Manage button
- Left-click the Device and select the "else phone" i.e no "SM-N9810" but the phone you had connected with USB cable
- Or Left-click Manage and it opens up Devices, you can see Device, select it and select the "else phone" i.e. the phone you had connected with USB cable and like to use
- Press Apply on the bottom-right and check is the Current state a green ball & Ready to use - if yes press OK
After above try to use green arrow (Run) to deploy the project to target and execute on it.