启用minifyEnabled为true后,在某些设备上会收到错误消息。
某些设备显示“正在打印ResponseException消息:空”
某些设备显示“ java.lang.IllegalStateException:e.print()不能为空”
某些设备显示致命异常:main java.lang.NullPointerException
在Samsung Android 4.1上,我收到此错误:
06-17 17:25:00.109 6936-6936/com.example.test E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at java.lang.Throwable.getStackTrace(Throwable.java:201)
at g.c.c.a.a(:196)
at g.c.c.a.a(:188)
at g.c.c.a.printStackTrace(:164)
at g.c.c.a.printStackTrace(:159)
at g.c.g.a.b(:382)
at g.c.e.d.e.a(:80)
at g.c.e.d.a.a(:100)
at g.c.e.d.a.b(:110)
at g.c.e.e.b.o$a.b(:59)
at g.c.e.e.b.p$a.j(:201)
at g.c.e.e.b.p$a.run(:255)
at g.c.a.b.c$b.run(:124)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4960)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
在模拟器Android 4.4上出现此错误:
06-17 18:07:29.674 2776-2776/com.example.test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.test, PID: 2776
g.c.c.a: 2 exceptions occurred.
at g.c.e.d.e.a(:80)
at g.c.e.d.a.a(:100)
at g.c.e.d.a.b(:110)
at g.c.e.e.b.o$a.b(:59)
at g.c.e.e.b.p$a.j(:201)
at g.c.e.e.b.p$a.run(:255)
at g.c.a.b.c$b.run(:124)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
ComposedException 1 :
{"a":0}
ComposedException 2 :
java.lang.IllegalStateException: e.print() must not be null
at com.example.ui.base.j.a(:146)
at com.example.ui.base.j.a(:118)
at com.example.e.g.b.e.a(:78)
at com.example.e.g.b.d.a(:72)
at com.example.e.g.b.d.accept(:15)
at g.c.e.d.e.a(:77)
at g.c.e.d.a.a(:100)
at g.c.e.d.a.b(:110)
at g.c.e.e.b.o$a.b(:59)
at g.c.e.e.b.p$a.j(:201)
at g.c.e.e.b.p$a.run(:255)
at g.c.a.b.c$b.run(:124)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
在Genymotion Android 4.4上,我收到此错误:
06-19 00:41:18.629 1851-1851/com.example.test W/g: printing ResponseException message: null
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: g.c.c.a: 2 exceptions occurred.
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.d.e.a(:80)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.d.a.a(:100)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.d.a.b(:110)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.e.b.o$a.b(:59)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.e.b.p$a.j(:201)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.e.e.b.p$a.run(:255)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at g.c.a.b.c$b.run(:124)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at android.os.Handler.handleCallback(Handler.java:733)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at android.os.Looper.loop(Looper.java:136)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5001)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
06-19 00:41:18.637 1851-1851/com.example.test W/System.err: at dalvik.system.NativeStart.main(Native Method)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: ComposedException 1 :
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: {"a":0}
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: ComposedException 2 :
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: java.lang.IllegalStateException: e.print() must not be null
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.example.ui.base.j.a(:146)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.example.ui.base.j.a(:118)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.example.e.g.b.e.a(:78)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.example.e.g.b.d.a(:72)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.example.e.g.b.d.accept(:15)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.d.e.a(:77)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.d.a.a(:100)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.d.a.b(:110)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.e.b.o$a.b(:59)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.e.b.p$a.j(:201)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.e.e.b.p$a.run(:255)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at g.c.a.b.c$b.run(:124)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at android.os.Handler.handleCallback(Handler.java:733)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at android.os.Looper.loop(Looper.java:136)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5001)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
06-19 00:41:18.641 1851-1851/com.example.test W/System.err: at dalvik.system.NativeStart.main(Native Method)