Qt Creator Android error “Platform SDK installed”

前端 未结 11 1955
春和景丽
春和景丽 2020-12-14 14:28

I am developing Qt Cross platform application for Android, recently i have updated Qt creator and Installed new Qt version. I am using \'Qt Creator version 4.5.0\'

相关标签:
11条回答
  • 2020-12-14 14:50

    In my case I had red crosses for SDK tools installed. and for Platform SDK installed.

    To resolve it I needed to download android sdk tools from https://androidsdkoffline.blogspot.com/p/android-sdk-tools.html

    file was tools_r25.2.5-linux.zip

    I placed extracted tools folder in sdk folder. My setup now works only with open-jdk-8 Now I can deploy qml apps on my S10

    0 讨论(0)
  • 2020-12-14 14:51

    Linux:

    The proposed solutions did not work for me.

    I already had Java 8 and with Qt 5.12 installed the latest SDK and NDK are supposed to work (should work since Qt 5.9).

    After hours of fiddling, reinstalling Qt and Java, removing configs, downloading older NDKs and all, it still did not work.

    My mistake was that I unpacked SDK and NDK as root into a read-only location for the user. After chowning the folder to the my normal user, Creator found everything and worked as expected.

    So also check, if the user running Qt Creator owns the folder containing SDK and NDK. It's a quick check that might prevent you from deleting your configs. :)

    Edit: In August 2019, I added a patch to Qt Creator, checking for this partiicular case and reporting an error accordingly. https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=4ca3bd4d0f336f7055080e78849c0607ba99843c

    0 讨论(0)
  • 2020-12-14 14:51

    To add on to the accepted answer of needing JDK 8 - if you already have a newer version of Java running, you can easily install a standalone version 8 alongside it. Use the installer from https://adoptopenjdk.net/ and select v8.0. Make sure to update your preferences to point to the Java 8 and things should work.

    0 讨论(0)
  • 2020-12-14 14:58

    OK, after many many hours try-out I finally find out how we can fix it.

    • Download and use Android NDK r10e separately (don't install it through SDK Manager)
    • Download and use Android SDK without Android Studio (download android tools from official site) Qt Preferences will installs all needed packages (build tools , platform tools, sdk tools, platform android-28)
    • Install and use Java JDK 8 (not newer)

    Please note that installing SDK packages through Android Studio will not be detectable by Qt

    0 讨论(0)
  • 2020-12-14 15:01

    "Platform SDK installed" requires a working a sdkmanager command.

    If you have the Platform SDK installed, try running the sdkmanager command directly.

    This is $ANDROID_SDK_ROOT/tools/bin/sdkmanager. On my Linux system this was in $HOME/Android/Sdk/tools/bin/sdkmanager.

    The typically issue is

    • You need to install JDK 8 properly (note that JDK 9, JDK 10 and JDK 11 will not work!)

    If you have installed a newer JDK you will need to downgrade to JDK 8. Either OpenJDK or Oracle will work, but it needs to be JDK 8.

    Work thru any remaining issues with the sdkmanager command line, then, once that's done, you should find Qt Creator to be happy again.

    References:

    • https://developer.android.com/studio/write/java8-support
    • https://issuetracker.google.com/issues/67495440
    0 讨论(0)
提交回复
热议问题