Instabug 3 Android 生成器崩溃(NullPointerException)
Instabug 3 Android Builder crash (NullPointerException)
我最近将我的生产 Android 应用程序从 Instabug 2.5.1 更新到 3.1.1。从那时起,对于 Android 4-6 的手机,我一直收到由 InstabugFeaturesManager 中的 NullPointerException 引起的 Fabric 崩溃报告。我没有在测试中看到这个问题,也没有能够重现它。
这是崩溃报告:
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.access00(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.access00(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 库被严重混淆,所以我无法理解为什么它会在内部崩溃。我环顾四周,但没有发现其他人遇到此问题的案例。我在这里遗漏了什么吗?
我更新到新版本 (3.1.4),Instabug 团队推出解决了这个问题。
我最近将我的生产 Android 应用程序从 Instabug 2.5.1 更新到 3.1.1。从那时起,对于 Android 4-6 的手机,我一直收到由 InstabugFeaturesManager 中的 NullPointerException 引起的 Fabric 崩溃报告。我没有在测试中看到这个问题,也没有能够重现它。
这是崩溃报告:
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.access00(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.access00(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 库被严重混淆,所以我无法理解为什么它会在内部崩溃。我环顾四周,但没有发现其他人遇到此问题的案例。我在这里遗漏了什么吗?
我更新到新版本 (3.1.4),Instabug 团队推出解决了这个问题。