MiEcosystem / NewXmPluginSDK

xiaomi smarthome app plugin sdk
Apache License 2.0
176 stars 81 forks source link

获取DeviceStat.did为空 #89

Open Chgocn opened 5 years ago

Chgocn commented 5 years ago

从后台日志查看到获取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)

zanetti4 commented 5 years ago

请问涉及到的设备是什么?只出现在安卓系统吗?

Chgocn commented 5 years ago

走步机,只出现在安卓系统上。

lvjie0519 commented 4 years ago

@Chgocn 使用的是哪个版本的apk? 这个有做过修复