android.view.View$OnUnhandledKeyEventListener

后端 未结 9 2478
难免孤独
难免孤独 2020-12-08 09:03

I am new to Android Studio and I don\'t get why my toolbar isn\'t shown as described by https://developer.android.com/training/appbar/setting-up I know there are already som

9条回答
  •  半阙折子戏
    2020-12-08 09:35

    https://github.com/DonaldDu/FixUnhandledEvent

    android.view.View$OnUnhandledKeyEventListener is add in api28.

    If runtime device below 28, can't find the class, but run without fatal error.

    We can inject the class in debug mode to ignore error message.

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    //inject class when api<28 && debug==true
    debugImplementation 'com.github.DonaldDu:FixUnhandledEvent:1.0'
    

提交回复
热议问题