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

老子叫甜甜 提交于 2019-12-09 02:51:55

问题


I'm trying to run a new Qt Quick application on my android device through Qt Creator. 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).

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:

"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

How can I configure my project to target a different android version when debugging?

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. I'm just hoping to get debug-mode working.


回答1:


You should go to Projects > Build Android APK > Details for configuring deployment settings. There is an option named Android Build SDK. Just select the appropriate Android API version.

Also to create an APK package, select the Bundle Qt libraries in APK option :

You can also select Create Templates to create the manifest file to set application settings like icon, name, ...



来源:https://stackoverflow.com/questions/28684857/how-can-i-change-the-android-platform-in-qt-creator-to-not-be-android-1-in-de

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