QtC Android Setup

Starting QtCreator without a valid Android setup, Creator displays a yellow colored message at the bottom, from where you can configure Android.

Tapping on ‘Configure Android’ directly opens Preferences – Devices – Android

Preferences – Devices – Android

Don’t panic if you only see red crosses 😉 We’ll go through the issues and HowTo fix them.

In my example, only a JDK was automatically found: jdk-17

Hint: older versions require JDK8 – Qt 5.15.13 uses a newer Gradle, which itself requires JDK11. Have tested with JDK11 or JDK17 – both seems to work.

If QtC doesn’t found a JDK, then you have 2 options:

  • Choose a JDK from your disc
  • Tap on the earth button on the right to find from the web and download

Here you can directly Download a JDK

Devices – Android

As next the Android SDK location is needed. Again you can ‘Choose’ from disc or go to the web and Download.

I already have SDK tools installed, but you can download SDK tools here. If something was missed from your current SDK Tools you can directly install missing packages:

In my case QtC updated 3 packages:

Confirm some licenses.

and you’re donw with SDK Tools 🙂

QtCreator also downloaded needed NDKs. If you need OpenSSL, you can choose from an existing location or Download.

Hint: In your .pro at the bottom the OpenSSL is automatically included. In my case:

android: include(/Applications/daten/_android/android-sdk-26_1_1/android_openssl/openssl.pri)

Now we take a look at ‘SDK Manager’

It’s agood idea to tap on ‘Update Installed’

macOS trouble

Attention on macOS. It can happen that you’ll get messages like ‘clang++ cannot be opened – developer not verified’ or from ‘gdb…’ or ‘libc++…’

Then you have to go to system preferences – Security

There’s a button on bottom right to ‘Allow’. This can happen some times until all are allowed.

All of this only happens for the very first time – later all will run without interruptions.

Preferences – Kits

Now we want to verify, that QtCreator has Auto-detected the Android Kit.

uuups – no Android Kit ?

Close Preferences and re-open or restart QtCreator.

Now the Kit is there 🙂 Ignore the warning icons for Android and iOS – this is only because we haven’t connected a device yet.

Now we’re done with the preferences and want to try, if all Kits are working as expected, so we can run on Desktop, Android, iOS.

GoOn to ‘Build and run on desktop