简体   繁体   English

无法使用 Qt Creator 创建 Android 套件

[英]Unable to create Android kits using Qt Creator

在此处输入图像描述 I have followed the official documentation on how to install the prerequisites (Android sdk etc.) as shown in my screen shot below on a Windows 10 machine running Qt Creator 4.14.0.我已按照有关如何安装先决条件(Android sdk 等)的官方文档,如下面的屏幕截图所示,在运行 Qt Creator 4.14.0 的 Windows 10 机器上。

[![Android settings in Qt Creator][2]][2] [![Qt Creator 中的安卓设置][2]][2]

However, the Android Kit is not detected when creating an Android project.但是,在创建 Android 项目时未检测到 Android 套件。

After hitting the 'Apply' button, this is how the kit section looks like:点击“应用”按钮后,套件部分如下所示:

在此处输入图像描述

There could be a compatibility issue with all the tools you are trying to use, but it's hard to say if the message tab does not report any issue.您尝试使用的所有工具都可能存在兼容性问题,但很难说消息选项卡是否没有报告任何问题。

I use Qt Creator 4.12 with Qt 5.14.2, I zipped it here .我使用 Qt Creator 4.12 和 Qt 5.14.2,我把它压缩在这里 I also zipped my SDK/JDK here .我还在这里压缩了我的 SDK/JDK。

  • Extract the first zip file to a folder on your local machine (let's call it QTCREATOR_FOLDER)将第一个 zip 文件提取到本地计算机上的文件夹(我们称之为 QTCREATOR_FOLDER)
  • Extract the second zip file to a different folder将第二个 zip 文件解压缩到不同的文件夹
  • Add copied JDK's bin folder to your PATH variable将复制的 JDK 的 bin 文件夹添加到 PATH 变量中
  • Update all xml files from QTCREATOR_FOLDER\Tools\QtCreator\share\qtcreator\QtProject\qtcreator (android.xml, debuggers.xml, qtversion.xml, toolchains.xml, QtCreator.ini) to have all existing references to C:/Android2/QtCreator5_12 be replaced by QTCREATOR_FOLDER (with slashs, no backslashs) Update all xml files from QTCREATOR_FOLDER\Tools\QtCreator\share\qtcreator\QtProject\qtcreator (android.xml, debuggers.xml, qtversion.xml, toolchains.xml, QtCreator.ini) to have all existing references to C:/Android2/ QtCreator5_12 被 QTCREATOR_FOLDER 替换(有斜线,没有反斜线)
  • Open QtCreator: QTCREATOR_FOLDER\Tools\QtCreator\bin\qtcreator.exe, go to “Outils, Options, Appareils mobiles, Android” and specify the paths to copied JDK and SDK folders.打开 QtCreator:QTCREATOR_FOLDER\Tools\QtCreator\bin\qtcreator.exe, go 到“Outils, Options, Appareils mobiles, Android” 并指定复制的 JDK 和 SDK 文件夹的路径。 Ignore OpenSSL errors.忽略 OpenSSL 错误。 Clic “Apply”.单击“应用”。 Close and re-open QtCreator.关闭并重新打开 QtCreator。
  • Go to “Outils, Options, Kits”, an auto-detected “Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.2 for Android)” should appear. Go to “Outils, Options, Kits”, an auto-detected “Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.2 for Android)” should appear.

在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM