Open ikakaxi opened 2 years ago
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) findViewById<Button>(R.id.button).setOnClickListener { Log.e("TAG","aaaa") } } }
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' // apply ByteX宿主 apply plugin: 'bytex' ByteX { enable true enableInDebug false logLevel "DEBUG" } // 按需apply bytex 插件 apply plugin: 'bytex.refer_check' apply plugin: 'bytex.method_call_opt' method_call_opt { enable true //建议开发模式关闭 enableInDebug true logLevel "DEBUG" //是否在log中显示删除方法调用指令后的方法指令,一般调试时使用 showAfterOptInsLog false //需要删除的方法配置 methodList = [ //下面的每一项配置必须严格按照数据配置,一个地方不对这一项不生效。 //class#method#desc "android/util/Log#v#(Ljava/lang/String;Ljava/lang/String;)I", "android/util/Log#v#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I", "android/util/Log#d#(Ljava/lang/String;Ljava/lang/String;)I", "android/util/Log#d#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I", "android/util/Log#i#(Ljava/lang/String;Ljava/lang/String;)I", "android/util/Log#i#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I", "android/util/Log#w#(Ljava/lang/String;Ljava/lang/String;)I", "android/util/Log#w#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I", "android/util/Log#e#(Ljava/lang/String;Ljava/lang/String;)I", "android/util/Log#e#(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I", "android/util/Log#println#(ILjava/lang/String;Ljava/lang/String;)I", "java/lang/Throwable#printStackTrace#()V", "com/google/devtools/build/android/desugar/runtime/ThrowableExtension#printStackTrace#(Ljava/lang/Throwable;)V" //还有自己项目中封装的Logger方法 ] onlyCheckList = [ //"com/ss/*", //"com/bytedance/*" ] whiteList = [ "com/facebook/stetho*", ] }
根本没效果,点击按钮仍然输出日志
我也是,是不是对Kotlin无效啊
@ikakaxi 你是用debug包试的吗,我看你的配置里
ByteX { enable true enableInDebug false logLevel "DEBUG" }
enableInDebug = false ,你改成true试试?
根本没效果,点击按钮仍然输出日志