简体   繁体   中英

Turn off logging and debugging

I spent 2 days looking for a solution to this problem, but to no avail, when I try to publish my application on google play, I get this issue:

You have imported an APK or Android App Bundle that can be debugged. For security reasons, you must disable debugging before the applicable APK or Android App Bundle can be published on Google Play. Learn more about APKs or Android Bundle Bundle packages for which the Debug feature has been enabled.

Google: "disable debugging" Google PlaystorePrepare for releaseTurn off logging and debugging

Turn off logging and debugging

Make sure you deactivate logging and disable the debugging option before you build your application for release. You can deactivate logging by removing calls to Log methods in your source files. You can disable debugging by removing the android:debuggable attribute from the <application> tag in your manifest file, or by setting the android:debuggable attribute to false in your manifest file. Also, remove any log files or static test files that were created in your project.

Also, you should remove all Debug tracing calls that you added to your code, such as startMethodTracing() and stopMethodTracing() method calls.

Important : Ensure that you disable debugging for your app if using WebView to display paid for content or if using JavaScript interfaces, since debugging allows users to inject scripts and extract content using Chrome DevTools. To disable debugging, use the WebView.setWebContentsDebuggingEnabled() method.

Turn Off Development Build on the build settings box:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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