Qt Creator Android error “Platform SDK installed”

2019-01-23 22:50发布

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'. I have updated to 'QT version 5.10'. This Set up is done on Ubuntu 16.04.

Followed link Getting Started with QT Installation.

I am always getting Error message "Android Settings have error" in Qt Creator->Tools->Options->Devices->Android.

QT Android Installation Issue

Because of above issue i am not able to build application for Android.

I have recently updated my Android sdk, I am able to build and run Sample application from Android Studio, indicating that SDK instalation is working properly. I am using Android SDK tools 26.1.1. Please check bellow screen shots.

Android Studio SDK manager

Android SDK build tools Installed. enter image description here

Android SDk platforms installed enter image description here

Already gone through different links on Stack Overflow and QT forum, All are Suggesting downgrade of Android SDK tools(Due to QT Known bug), but none of the solution is working for me. I know there are few known bugs building Android application with QT 5.9 and Qt Creator version 4.0. I guess It is resolved, as same set up is working fine on Windows 10.

QT Creator wont list any available Android Build SDKs QT Android Installation error

Please help if anybody here resolved same issue.

7条回答
别忘想泡老子
2楼-- · 2019-01-23 23:35

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

查看更多
唯我独甜
3楼-- · 2019-01-23 23:37

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.

查看更多
可以哭但决不认输i
4楼-- · 2019-01-23 23:44

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!

查看更多
一纸荒年 Trace。
5楼-- · 2019-01-23 23:45

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). enter image description here

And Qt configuration side: enter image description here

enter image description here

查看更多
时光不老,我们不散
6楼-- · 2019-01-23 23:45

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

查看更多
迷人小祖宗
7楼-- · 2019-01-23 23:47

Platform SDK check seems to use the sdkmanager command line to list the available packages installed. This is $ANDROID_SDK_ROOT/tools/bin/sdkmanager. On my Linux system this was in $HOME/Android/Sdk/tools/bin/sdkmanager.

Run the command line directly and if you see errors (typically Java errors), you need to fix those first. Like people have set, the typical issue is:

  • Java 8 is okay, but JDK 9 and JDK 10 don't appear to work with sdkmanager

Even if you did fix it for JDK 9 / 10 you may get issues compiling, so, your best bet is to downgrade to Java 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.

查看更多
登录 后发表回答