10

我正在尝试通过 Qt Creator 在我的 android 设备上运行一个新的 Qt Quick 应用程序。但是,Qt Creator 继续使用 Android API 版本1,而我希望它针对 Android API 版本 10(又名 Android 2.3.3)。

当我运行 Debug->Start Debugging 然后在我的物理设备和模拟器上选择一个armeabiarmeabi-v7a时,Qt 神秘地继续定位android--1

"C:\Qt\5.4\android_armv5\bin\androiddeployqt.exe" --input C:/dev/qc/build-qc_mobile-Android_for_armeabi_GCC_4_9_Qt_5_4_0-Debug/android-libqc_mobile.so-deployment-settings.json --output C:/dev/qc/build-qc_mobile-Android_for_armeabi_GCC_4_9_Qt_5_4_0-Debug/android-build --deployment bundled --android-platformandroid--1--jdk C:/jdk1.8.0_05 --ant C:/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/bin/ant.bat

调试时如何配置我的项目以针对不同的 android 版本?

My Qt creator instance is:
Qt Creator 3.3.0 (opensource)
Based on Qt 5.4.0 (MSVC 2010, 32 bit)

Built on Dec 8 2014 at 15:24:21

From revision d36c4d87db

仅供参考,将发布模式 APK 部署到我的设备确实有效。我只是希望让调试模式工作。

4

1 回答 1

11

您应该转到Projects > Build Android APK > Details来配置部署设置。有一个名为Android Build SDK的选项。只需选择适当的 Android API 版本。

还要创建一个 APK 包,选择Bundle Qt library in APK选项:

在此处输入图像描述

您还可以选择创建模板来创建清单文件以设置应用程序设置,如图标、名称、...

于 2015-02-24T05:59:38.530 回答