我最近更新了我的Android应用程序,从Instabug 2.5.1升级到3.1.1。从那时起,我就得到了从Android4-6到Android4-6等手机使用的NullPointerException在InstabugFeaturesManager上引起的连续崩溃报告。我还没有在测试中看到这个问题,也没有能够重现它。
以下是坠机报告:
Fatal Exception: java.lang.RuntimeException: Unable to create application com.myapp.main.MyApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6032)
at android.app.ActivityThread.access$1700(ActivityThread.java:218)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6934)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
at com.instabug.library.h.a(InstabugFeaturesManager.java:70)
at com.instabug.library.g.b(InstabugDelegate.java:208)
at com.instabug.library.Instabug$Builder.build(Instabug.java:1277)
at com.instabug.library.Instabug$Builder.build(Instabug.java:1372)
at com.myapp.main.MyApplication.onCreate(MyApplication.java:107)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1035)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6029)
at android.app.ActivityThread.access$1700(ActivityThread.java:218)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6934)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)build.gradle
compile('com.instabug.library:instabug:3.1.1') {
exclude group: 'com.android.support';
exclude group: 'com.google.android.gms';
}注意:我将那些库排除在外,因为我想控制我的应用程序使用的版本。
MyApplication#onCreate()
new Instabug.Builder(this, MyConstants.Application.INSTABUG_KEY)
.setInvocationEvent(InstabugInvocationEvent.SHAKE)
.setShakingThreshold(500)
.setCrashReportingState(Feature.State.DISABLED)
.setTrackingUserStepsState(Feature.State.ENABLED)
.setInAppMessagingState(Feature.State.DISABLED)
.setIntroMessageEnabled(false)
.setEmailFieldRequired(true)
.build(); //Crash originates here我认为这不是你通常的NullPointerException问题。首先,我不会在构建中添加任何可能为null并在内部崩溃的内容。此外,Instabug库被严重混淆,所以我无法理解它为什么在内部崩溃。我到处都找过了,但没有发现有其他人有这个问题。我是不是漏掉了什么?
发布于 2016-12-19 21:43:42
我更新到了一个新的版本(3.1.4),Instabug团队推出了解决这个问题的方法。
https://stackoverflow.com/questions/41158939
复制相似问题