简体   繁体   English

如何使用QT 5.2删除android上的发布输出中的调试模式

[英]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.

相关问题 如何在发布模式下调试Android应用程序? - How to debug android app on release mode? 如何使用 Android Studio 在发布模式下调试 Android 应用程序 - How to debug the Android App in release mode using Android studio 如何调试仅在发布模式下崩溃的 Android 应用 - How do I debug an Android app that crashes only in Release Mode 不同行为的调试与发布模式android —发布模式冻结 - Different behaviour debug vs release mode android — release mode freezes Android AIDL、proguard、调试和发布模式令人头疼 - Android AIDL, proguard, debug and release mode headaches 具有列表的Android AlertDialog在调试模式下崩溃,但未发布 - Android AlertDialog with list crashes in Debug mode but not Release Android - 用于调试和发布模式的应用程序图标 - Android - app icon for debug and release mode Android minifyEnabled true在调试和发布模式下不起作用 - Android minifyEnabled true is not working in Debug and Release mode Android APK 在发布模式下运行时崩溃,但在调试模式下不会崩溃 - Android APK crashes on run in release mode, but not in debug mode Xamarin应用程序是在调试模式下构建,但不是在Android的发布模式下构建 - Xamarin application is Building in Debug mode but not Building in Release mode for Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM