Configure Qt Creator for Android development

早过忘川 提交于 2020-07-22 21:19:20

问题


I have installed:

Qt 5.14.1 for msvc 2017 & Android installed to c:\Qt\Qt5.14.1\:

Compilers available in Qt Creator:

Kits available:

JDK-13.0.2 installed to c:\Program Files\Java\jdk-13.0.2

Android Studio 3.6.1 g:\Android\Android Studio\ with SDKs installed to g:\Android\SDK as shown below:

SDK tools:

Now what I see in Qt Creator:

How can I fix these errors? Why did they arise?

Edit: I've installed JDK 8 instead of 13. But still have the same red crosses.

Also in the topic 'Platform SDK installed' red X Adding Android SDK Tools in Qt Creator says that SDK 25.2.5 has to be installed, but how can I install SDK 25.2.5 ? Android Studio doesn't have this version available in the System Settings.

Edit 2: I've downloaded the archive "Android SDK Tools 25.2.5" from the link https://androidsdkmanager.azurewebsites.net/SDKTools . As I understand, this archive contains "SDK tools 25.2.5" + "some Android package manager". Then I:

  1. Unpack the archive to the folder g:\Android\SDK\tools\. What the folder actually contains:
ant\
apps\
bin\
lib\
lib64\
proguard\
qemu\
support\
templates\
android.bat
ddms.bat
draw9patch.bat
hierarchyviewer.bat
jobb.bat
lint.bat
monitor.bat
monkeyrunner.bat
traceview.bat
uiautomatorviewer.bat
emulator.exe
emulator-arm.exe
emulator-check.exe
emulator-crash-service.exe
emulator-mips.exe
emulator-x86.exe
emulator64-crash-service.exe
mksdcard.exe
source.properties
NOTICE.txt
package.xml
  1. Run android.bat from the folder and in the window that appears, I see that now I have SDK 25.2.5 installed:

And in Qt Creator Android Settings are almost ok now:


回答1:


You can check these links that may help you. Although, its looks like the problem is the JDK version, you should test with JDK 8, instead the latest release.

  • https://wiki.qt.io/Qt_for_Android_known_issues
  • https://forum.qt.io/topic/90310/platform-sdk-installed-red-x-adding-android-sdk-tools-in-qt-creator/20


来源:https://stackoverflow.com/questions/60641551/configure-qt-creator-for-android-development

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