简体   繁体   English

Cordova:如何调试 android --prod build

[英]Cordova : how to debug android --prod build

I have an issue with a cordova application which occurs only when building it with the command : cordova build android --prod --release When building in debug mode, everything works fine.我有一个cordova应用程序的问题,只有在使用以下命令构建它时才会发生:cordova build android --prod --release 在调试模式下构建时,一切正常。

I use chrome://inspect to debug my app, but this work only with debug build我使用 chrome://inspect 来调试我的应用程序,但这仅适用于调试版本

How can I inspect and debug my app when building for production ?在为生产构建时如何检查和调试我的应用程序?

Edit: no solution, this seem to be impossible to do.编辑:没有解决方案,这似乎是不可能的。

If someone wants to do debug in production, is possible using this configuration in the config.xml file, for android:如果有人想在生产中进行调试,可以在 config.xml 文件中使用此配置,对于 android:

<widget ... >
<name>myapp</name>
<platform name="android">
    <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
        <application ... android:debuggable="true" />
    </edit-config>
</platform>

You can't debug the release version of your application with chrome://inspect because debugging in release version is deactivated.您无法使用 chrome://inspect 调试应用程序的发布版本,因为发布版本中的调试已停用。 You have to use the debug version to debug your app.您必须使用调试版本来调试您的应用程序。

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

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