Should I comment my log calls when creating my final package?

后端 未结 4 1295
小鲜肉
小鲜肉 2020-12-08 03:12

I have an application that uses a lot of Log.d() or Log.e() calls for debugging. Now I want to create my final package for release. The Android Exp

4条回答
  •  爱一瞬间的悲伤
    2020-12-08 03:23

    From developer.android.com:

    Turn off logging and debugging and clean up data/files For release, you should make sure that debug facilities are turned off and that debug and other unnecessary data/files are removed from your application project.

    Remove the android:debuggable="true" attribute from the element of the manifest. Remove log files, backup files, and other unnecessary files from the application project. Check for private or proprietary data and remove it as necessary. Deactivate any calls to Log methods in the source code.

    Source

提交回复
热议问题