error setting up Qt for Android
-
wrote on 14 Nov 2022, 17:12 last edited by
Hi all -
I'm trying to enable the Android platform within Creator, and I'm getting several errors. My Devices page looks like this:
When I run the SDK Manager, it tells me several things are missing, and attempts to install them. But I keep getting the error "The operation requires user interaction..." as seen below.
I can't find the sdkmanager (the path to it doesn't seem to be added to my $PATH variable), and I wouldn't know what to do with it to correct these errors anyway.Can someone tell me what I'm missing here? Windows 10, Creator 8.0.2.
Thanks...
-
wrote on 14 Nov 2022, 17:56 last edited by JoeCFD
you can see your SDK requires Java 1.8, but you have jdk 11.0. Mismatch! I guess your SDK version is wrong. I have 30 and 31 which match jdk 11.
And SDK location normally has Sdk, yours has only Android Studio which may not be the right dir for SDK. My Linux settting is like: /opt/thirdParties/android/Sdk -
you can see your SDK requires Java 1.8, but you have jdk 11.0. Mismatch! I guess your SDK version is wrong. I have 30 and 31 which match jdk 11.
And SDK location normally has Sdk, yours has only Android Studio which may not be the right dir for SDK. My Linux settting is like: /opt/thirdParties/android/Sdk -
wrote on 14 Nov 2022, 18:19 last edited by JoeCFD
You can use Android Studio to install SDK for Android 11 and 12.
under:
Tools->SDK Manager->Appearance & Behavior->System Settings->Android SDK
you select Android 11 and 12 to install. -
You can use Android Studio to install SDK for Android 11 and 12.
under:
Tools->SDK Manager->Appearance & Behavior->System Settings->Android SDK
you select Android 11 and 12 to install.wrote on 14 Nov 2022, 19:45 last edited by@JoeCFD you were right -- the installer placed the SDK into:
C:\Users\Michael.Zimmers\AppData\Local\Android\Sdk
(This is an annoying feature of Windows that I'm still learning to remember.)
Once I got the correct SDK location specified in Creator, the rest all worked itself out:
Thanks for the help...
-
wrote on 14 Nov 2022, 19:55 last edited by
This place is indeed annoying.
-
wrote on 16 Nov 2022, 09:31 last edited by
At setup_android.cmake I have a CMake script that downloads the JDK and Android SDK via CMake.
Usage is:
cmake -P setup_android.cmake
Works cross-platform. I tend to keep it up to date with Android's sdk_definitions.json, but you can have a look there if things do not match.
Having control and transparency over what's getting installed results in less confusion.
I don't know why the Android settings dialog doesn't have the same functionality for the JDK like it does for the Android SDK.
5/7