异常类型:app运行时异常,启动闪退
手机型号:华为p20
手机系统版本::Android 9.0
tinker版本:1.9.13.2
gradle版本:3.2.1
是否使用热更新SDK: 否
系统:如:Mac
堆栈/日志:
2019-07-03 11:08:11.149 9682-9682/com.denachina.pickle E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.denachina.pickle, PID: 9682
java.lang.RuntimeException: Unable to instantiate application com.denachina.pickle.MyApplication: java.lang.IllegalAccessException: void com.denachina.pickle.MyApplication.() is not accessible from java.lang.Class<android.app.AppComponentFactory>
at android.app.LoadedApk.makeApplication(LoadedApk.java:1164)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6529)
at android.app.ActivityThread.access$1900(ActivityThread.java:267)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:7470)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
Caused by: java.lang.IllegalAccessException: void com.denachina.pickle.MyApplication.() is not accessible from java.lang.Class<android.app.AppComponentFactory>
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:50)
at android.app.Instrumentation.newApplication(Instrumentation.java:1127)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1156)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6529)
at android.app.ActivityThread.access$1900(ActivityThread.java:267)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:7470)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
protected MyApplication() {
super(7, "xxxxApplication", "com.tencent.tinker.loader.TinkerLoader", false);
}
protected 改为public即可,自动重写的是protected,比较坑,需要手动改成public