Delete SourceFile and LineNumber attributes of the class in the project during compilation
-
add build classpath
classpath "com.bytedance.android.byteX:SourceFileKiller:${plugin_version}"
-
apply and configure the plugin in your build.gradle(application)
apply plugin: 'bytex.sourcefile' SourceFile { enable true//enable state enableInDebug true//whether enable in debug build deleteSourceFile true//whether to delete SourceFile info deleteLineNumber true//whether to delete LineNumber info }