我只在特定设备中收到Null Pointer Exception错误,它们是
VIBE K6 Note(K53a48),VIBE K6电源(K33a42),VIBE K6(K33a48),P2(P2a42)。
他们都在android V 7.0中完全正常工作。
我知道这个问题已经被问到但是我假设为什么这些特定的设备只会导致问题,我的代码或操作系统中的错误是错误的吗?
请帮我解决这个问题 - 提前谢谢。
错误:
java.lang.RuntimeException:
at android.app.ActivityThread.handleStopService (ActivityThread.java:3344)
at android.app.ActivityThread.-wrap27 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1570)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6077)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)
Caused by: java.lang.NullPointerException:
at com.cambarkro.nightmode.services.Darkness.onDestroy (Darkness.java:107)
at android.app.ActivityThread.handleStopService (ActivityThread.java:3327)
错误行:
@Override
public void onDestroy() {
super.onDestroy();
wm.removeView(myView);
if (mNotifyManager != null) {
mNotifyManager.cancel(NOTIFICATION_ID);
}
else {
}
}
我在Playstore中的应用链接:
https://play.google.com/store/apps/details?id=com.cambarkro.nightmode&hl=en
崩溃报告图片: Here you can see errors are caused by specific devices only