从后台日志查看到获取DeviceStat.did为空,但是很难复现,理论上说这个did是从米家传过来的,不应该会是空的,详细日志如下:
java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.xiaomi.smarthome.device.api.DeviceStat.did' on a null object reference
at com.xiaomi.smarthome.device.api.BaseDevice.getDid(SourceFile:144)
at com.ksmb.walkingpad.core.WalkingPadDevice.getDevice(Unknown Source:23)
at com.ksmb.walkingpad.ui.main.MainActivity.onCreate(Unknown Source:48)
at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.launchActivity(SourceFile:834)
at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.doCreate(SourceFile:439)
at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.onCreate(SourceFile:341)
at android.app.Activity.performCreate(Activity.java:7183)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
从后台日志查看到获取DeviceStat.did为空,但是很难复现,理论上说这个did是从米家传过来的,不应该会是空的,详细日志如下: java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.xiaomi.smarthome.device.api.DeviceStat.did' on a null object reference at com.xiaomi.smarthome.device.api.BaseDevice.getDid(SourceFile:144) at com.ksmb.walkingpad.core.WalkingPadDevice.getDevice(Unknown Source:23) at com.ksmb.walkingpad.ui.main.MainActivity.onCreate(Unknown Source:48) at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.launchActivity(SourceFile:834) at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.doCreate(SourceFile:439) at com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivity.onCreate(SourceFile:341) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2908) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6938) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)