app闪退总是让我很烦,找到一个库阻止闪退用于debug
- android.enableJetifier
- 加入jitpack.io
maven {url "https://jitpack.io"
}
implementation 'com.github.alhazmy13:Catcho:v1.1.0'
override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)Catcho.Builder(this).recipients("fucker@fuckerfucker.org").build()val catchoError = intent.getSerializableExtra(Catcho.ERROR)Toast.makeText(this@TrackLogActivity, catchoError.toString(), Toast.LENGTH_SHORT).show()setContentView(R.layout.activity_tracklog)initViewAndListener()getApiData()throw NullPointerException("fucker fucker throw an error")}
- ref link: https://github.com/alhazmy13/Catcho