Qt Creator Android error “Platform SDK installed”

十年热恋 提交于 2019-11-28 21:04:00

I just found this bugreport, where in the comments can be found

The native 'sdkmanager' tool can not update packages on windows and it fails with JDK 9 and these issues cascades to Qt Creator also.

I just tried installing JDK 8 and changing the path, and after reopening the settings menu it had worked!

I am using the answer box to show you how it works for me, one last comment: I don't install NDK 16 .. try remove it from Android manager; while (For Qt) install seperately NDK 10e (this was a Qt recommendation already).

And Qt configuration side:

After lot of effort I am able to fix this issue, thanks to Mohammad Kanan, Vesafary who's answer made me get closer to Answer, Actual issue resolved with the following steps. It may be helpful who are facing the same issue In Ubuntu or may work on other platforms as well.

  1. First Step is (as most of the answers suggest) changed from JDK 9 to JDK 8. I am using Java version "1.8.0_152".
  2. Step 1 didn't help me (Qt creator Persist some Settings), so i removed complete Qt 5.8,5.9,5.10 installation (Using Qt Maintainace tool) and following 2 links Uninstall Qt Completely, Uninstall Qt Creator.

and did Instalation again. May be your problem get resolved at this step.

  1. Step 2 also didn't help in my case, QT Creator still persist few settings and need to reset Qt creator settings. That can be done by deleting data in this folder

    ~/.config/QtProject ~/.config/Qt file ~/.config/QtProject.conf

path may be different in different System and OS. following links will be helpful in this case.

Creator FAQ

Stack Overflow Qt Settings 1

Stack Overflow Qt Settings 2

Now i am able to build and run android application.

"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:

Thanks I had the same problem, using Debian Buster (sid) with QtCreator 4.6.2 with Qt5.10.1

Go into ~/.config and wipe all the qtcreator settings, then start again specifying jdk.8 then the paths to the Android SDK and then the NDK.

It then works and the dumb SDK platform not installed error does not occur. :)

Out of interest I tried wiping everything ~/.config/qtcreator* and then specifying jdk10. Does not work as before.

If you then change to jdk8, it still does not work. You have to close QtCreator, wipe all the configs, reopen and choose it again, whereon it will work.

you do not need to wipe the configs for qt. simply install the latest of jdk 8 from here -> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

next select the jdk location in the options and then toward the bottom select the sdk manager tab. Click the update installed button and it should show a window with a list of licenses you need to agree to.

The problem lies with jdk 9 and up. For some odd reason it doesn't show the license agreements and doesn't continue beyond that point. The fix is sticking with jdk8

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

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. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!