Android SDK Setup
-
I've read numerous threads here and elsewhere. I still cannot figure out how to get things setup right. I have a fresh install of KDE Neon which is basically Ubuntu. I have a new install of Qt 6.6.1 and Qt Creator. I do not want to install Android Studio unless it is necessary.
I installed OpenJDK 21.
I started down the path of installing the Android SDK cmdliine-tools. I put them here:
~/software/android_sdk/cmdline-toolsI added exports of the following in my .profile, the logged out and back in:
ANDROID_HOME=$HOME/software/android_sdk
ANDROID_SDK_ROOT=$ANDROID_HOME/cmdline-toolsI was then able to run sdkmanager to install the othe pieces, paying attention to what the Qt 6.6. Android 'getting started' page listed for required versions:
sdkmanager --install "platforms;android-33" "platform-tools" "build-tools;33.0.0"
sdkmanager --install "ndk;25.1.8937393"
sdkmanager --install "emulator" "patcher;v4"I was then able to go into Qt Creator and point the Android device to the NDK. But, Qt Creator could not find the other parts. I realized that Qt Creator has a button for automagically installing the needed pieces. So, I deleted everything I had installed and put in my .profile. I went back into the Qt Creator Android device tab and clicked the 'Setup SDK' button. It did its thing and said everything was good to go. I did not initially pay attention to what versions it installed. I tried to build a project targeting Android. It failed saying I had android platform 31 and build-tools 31 while version 33 was needed for both. I am confused as to why it installed 31. I went back to the Android device tab and clicked the 'SDK Manager' button. I chose to uninstall platform 31 and install 33. However, I do not see build-tools 33 in the list. After applying changes, I got a dialog saying it wanted to install platform 31. I declined. I closed Qt Creator. I found that it had installed the parts in the same ~/software/android_sdk location where I originally had them. So, it must have cached that location. I once agaiin set ANDROID_HOME and ANDROID_SDK_ROOT to my .profile and logged out and back in. I used sdkmanager on the command line to install build-tools 33.0.0. I went back into Qt and tried to build. It re-installed platform and build-tools 31 and then complained I didn't have 33, which I do. This is beyond frustrating.
I really hope someone tell me how to get the Qt 6.6.1 & Creator setup for Android. I don't care if it is via me running sdkmanager or via Qt Creator's setup UI.