无法访问方法void android.arch.lifecycle.ReflectiveGenericLifecycleObserver

时间:2018-07-06 06:30:34

标签: android android-studio proguard

应用在发布模式下崩溃,以下是日志:

  

java.lang.RuntimeException:java.lang.IllegalAccessException:类   java.lang.Class无法访问方法void   android.arch.lifecycle.ReflectiveGenericLifecycleObserver。(java.lang.Object)   上课   java.lang.Class

保护规则:

  

-keepclassmembers类*实现android.arch.lifecycle.LifecycleObserver {       (...); }   -keepclassmembers类*扩展了android.arch.lifecycle.ViewModel {       (...); }   -keepclassmembers类android.arch.lifecycle.Lifecycle $ State {*; }   -keepclassmembers类android.arch.lifecycle.Lifecycle $ Event {*; }   -keepclassmembers类* {       @ android.arch.lifecycle.OnLifecycleEvent *; }

     

-keepclassmembers类*实现android.arch.lifecycle.LifecycleObserver {       (...); }

     

-keep类*实现android.arch.lifecycle.LifecycleObserver {       (...); }   -keepclassmembers类android.arch。** {*; }   -keep类android.arch。** {*; }   -dontwarn android.arch。**

0 个答案:

没有答案