[英]How to remove the debug mode in release output on android with QT 5.2
I'm looking for how to produce a file for android with qt without active debug mode, I used qt 5.2 for android. 我正在寻找如何使用qt生成一个没有主动调试模式的android文件,我使用qt 5.2 for android。 The output file is named QtApp-debug.apk.
输出文件名为QtApp-debug.apk。 I do not set the project or to remove the debug mode in release mode.
我没有在发布模式下设置项目或删除调试模式。 any idea?
任何的想法? Thank.
谢谢。 extract from the output of compilation:
从编译输出中提取:
[echo] Resolving Dependencies for QtApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: E:\Projects\qtprojects\build-CalcNd-Android_pour_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build\bin\QtApp-debug.apk
In Qt Creator go to Projects and select the Run option. 在Qt Creator中,转到Projects并选择Run选项。
Expand the Deploy Configurations section and click Create in the Sign Package section to create a Keystore. 展开“部署配置”部分,然后单击“签名包”部分中的“创建”以创建密钥库。
Turn on the "Sign package" checkbox and be sure to select the Certificate alias. 打开“签名包”复选框,并确保选择证书别名。
Build your package and it should have the -release.apk suffix. 构建你的包,它应该有-release.apk后缀。
NOTE: The sign package checkbox is OFF every time you open Qt Creator. 注意:每次打开Qt Creator时,sign包复选框都是OFF。 So, be sure to go in and re-check the box to sign the package when you re-open or the -debug.apk will mysteriously return!
所以,当你重新打开或者-debug.apk将神秘地返回时,请务必进入并重新检查框以签署包裹!
I think I have the answer to the problem. 我想我有问题的答案。 The file is generated in release mode with the trousseau of keys file, as soon as you change something in the project, QtCreator no longer generates a file in release mode but in debug mode.
该文件是在发布模式下使用trousseau的密钥文件生成的,只要您在项目中更改了某些内容,QtCreator就不再在发布模式下生成文件,而是在调试模式下生成文件。 It is then re-file a trousseau of keys with identical elements.
然后它会重新提交具有相同元素的trousseau键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.