Android SDK installation is missing necessary packages.

  • Re: Android build SDK not defined. Check Android settings.

    Is this still an issue ? I run into all of the described hurdles above with Qt Creator 4.9.2 Based on Qt 5.12.4 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit) and Android Studio Version 3.4.2. on openSuse Leap 15.1 and I have tried all the suggested solutions to no avail.
    Is there a solution to this ?
    Thanks in advance.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What exactly did you install ?
    How did you install it ?

  • Hi, I have installed Qt Creator and Android Studio using their installation wizards and not changing any of the suggested installation folders. Both applications work.
    What it boils down to is shown in the screenshot, under Creator -> Tools -> Options -> Devices -> Android I get the red cross for "Platform SDK installed". When I select "yes" for downloading the missing packages nothing happens. All the available Android flavors are present in the /home/user1/Android/Sdk/platforms/ folder.
    As you can see in the screenshot now I'm using /usr/lib64/jvm/java-11-openjdk-11, but I have tried the downgrade to the previously suggested java version and it did not help.
    I'm new to Qt and I hope I do not miss something obvious.
    Thank you.

  • @klausf Don't use Qt Creator to manage the Android SDK. Use Android Studio. My suggestion:

    • Uninstall everything
    • Install Android Studio
    • Use Android Studio to install the Android SDK (and NDK)
    • Install Qt

    The Qt installation will detect the Android SDK. That's the way I do it. Good luck.

  • Hi, Tom_H, thanks for your suggestion. Indeed, my sequence of installation was Creator first and Android studio second.
    So I followed your advice and installed Android Studio along with the SDKs first, and after that I've installed Qt Creator. Unfortunately to no avail, please see screenshot.

  • @klausf Silly question: did you install the Android platform for Qt?


  • Moderators

    hi @klausf
    in my past I had only issues with android studio as the source tor the android kits.
    It messes with path's & linkings.

    That's why I switch to the command line tools a long while ago. Much less heavy on the HD too!

    You get those rather simply by clicking on the download icon (green arrow pointing down) in the android settings of QtC


  • Hi, Tom_H, I sure did install those, please see screenshot.
    J.Hilk, I have tried this, too. The click on the little green arrow takes me to the Android Developer page where I can choose to install Android Studio or just the Android command line tools only ( under MacOS this might be different ).
    Anyway, with the installation of Android Studio I get everything needed in its correct place/folder and I get everything ticked off in green.
    Except for the red cross at "Platform SDK installed" although those SDKs are right there in the selected folder ( /home/user1/Android/Sdk ).
    Would you please let me know whats inside your folder for the Android SDK location ( in your screenshot: what's inside "Android SDK location: /Library/Android" ) ? Thank you.

  • As far as I know Android SDK needs JDK 8. It is not working with JDK 11.
    Edit: There is JDK 8 in Android Studio path. Example : android-studio/jre

  • Hello,
    after another install from scratch everything's fine now. This subject can be closed.

  • @klausf said in Android SDK installation is missing necessary packages.:

    This subject can be closed

    You need to mark your post as solved! Thanks.

  • i have the same problems with a big red X on "Platform SDK installed" line, and a truncated version of this error msg when i try to install missing packages. (using windows 10)
    i found out that the error msg is because qt creator was trying to run sdkmanager to install the missing package.
    tried to run it myself in cmd, getting this error which is due to removal of support in jdk for after jdk11+
    downgraded to jdk 8 and it works now.
    in case it helps anyone else stumbling on this same problem

    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
            at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
            at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
            at java.base/java.lang.ClassLoader.loadClass(
            ... 5 more

  • @Hai-Long-Tran, this absolutely worked for me. Kubuntu 18.04 LTS

  • Banned

    This post is deleted!

Log in to reply