简体   繁体   English

如何在调试模式下将Qt Creator中的--android-platform更改为不是android-1?

[英]How can I change the --android-platform in Qt Creator to not be android--1 in debug mode?

I'm trying to run a new Qt Quick application on my android device through Qt Creator. 我正试图通过Qt Creator在我的Android设备上运行一个新的Qt Quick应用程序。 However, Qt Creator keeps using Android API version 1 whereas I would like it to target an Android API version 10 ( aka Android 2.3.3). 但是,Qt Creator一直使用Android API版本1,而我希望它能够针对Android API版本10(又名Android 2.3.3)。

When I run Debug->Start Debugging and then select either an armeabi or armeabi-v7a on my physical device and emulators, Qt mysteriously continues to target android--1 : 当我运行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-platform android--1 --jdk C:/jdk1.8.0_05 --ant C:/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/bin/ant.bat "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-platform --jdk C:/jdk1.8.0_05 --ant C:/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/bin/ant.bat "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-platform android--1 --jdk C:/jdk1.8.0_05 --ant C:/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/bin/ant.bat

How can I configure my project to target a different android version when debugging? 如何在调试时将我的项目配置为针对不同的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

FYI, deploying a release-mode APK to my device does work. 仅供参考,将发布模式APK部署到我的设备上确实有效。 I'm just hoping to get debug-mode working. 我只是希望让调试模式正常工作。

You should go to Projects > Build Android APK > Details for configuring deployment settings. 您应该转到项目>构建Android APK>详细信息以配置部署设置。 There is an option named Android Build SDK . 有一个名为Android Build SDK的选项。 Just select the appropriate Android API version. 只需选择适当的Android API版本即可。

Also to create an APK package, select the Bundle Qt libraries in APK option : 另外要创建APK包,请在APK选项中选择Bundle Qt库

在此输入图像描述

You can also select Create Templates to create the manifest file to set application settings like icon, name, ... 您还可以选择“ 创建模板”以创建清单文件,以设置应用程序设置,如图标,名称,...

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

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