TuyaInc / tuyasmart_panel_android_sdk

1 stars 1 forks source link

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tuya.smart.panelcaller.api.AbsPanelCallerService" #3

Closed Lelight-Iot closed 4 years ago

Lelight-Iot commented 4 years ago

最近在接入贵司的智能音箱网关(zigbee),面板大部分功能都正常,就是点击红外设备的时候会闪退,报错日志如下。 产品PID: ixotxhzk


E/Tuya: ReactNativeCrash java.lang.RuntimeException: Could not invoke TYRCTNavManager.pushWithUIID
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:385)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
        at android.os.Looper.loop(Looper.java:214)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162) 
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
        at android.os.Looper.loop(Looper.java:214) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) 
        at java.lang.Thread.run(Thread.java:919) 
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/tuya/smart/panelcaller/api/AbsPanelCallerService;
        at com.tuya.smart.rnplugin.tyrctnavmanager.TYRCTNavManager.goPanel(TYRCTNavManager.java:93)
        at com.tuya.smart.rnplugin.tyrctnavmanager.TYRCTNavManager.pushWithUIID(TYRCTNavManager.java:57)
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374) 
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162) 
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
        at android.os.Looper.loop(Looper.java:214) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) 
        at java.lang.Thread.run(Thread.java:919) 
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tuya.smart.panelcaller.api.AbsPanelCallerService" on path: DexPathList[[zip file "/data/app/com.lelight.pro-xZzeOW7WwILSJhPzQledJw==/base.apk"],nativeLibraryDirectories=[/data/app/com.lelight.pro-xZzeOW7WwILSJhPzQledJw==/lib/arm64, /system/fake-libs64, /data/app/com.lelight.pro-xZzeOW7WwILSJhPzQledJw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.tuya.smart.rnplugin.tyrctnavmanager.TYRCTNavManager.goPanel(TYRCTNavManager.java:93) 
        at com.tuya.smart.rnplugin.tyrctnavmanager.TYRCTNavManager.pushWithUIID(TYRCTNavManager.java:57) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374) 
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162) 
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
        at android.os.Looper.loop(Looper.java:214) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) 
        at java.lang.Thread.run(Thread.java:919) 
Thewhitelight commented 4 years ago

您好,明天会更新版本修复这个问题。

Thewhitelight commented 4 years ago

@Lelight-Iot 您好,0.5.5版本已经发布,您更新至此版本即可。

Lelight-Iot commented 4 years ago

@Lelight-Iot 您好,0.5.5版本已经发布,您更新至此版本即可。 试用了0.5.5的版本,发现不闪退了,但是会报以下错误,是否还需要接其它业务包,iOS同事倒是没这方面问题(也只接了设备控制的业务包) MicroServiceManager no service found:com.tuya.smart.commonbiz.api.family.AbsFamilyService

Lelight-Iot commented 4 years ago

已经按demo方式设置了以下内容: TuyaWrapper.registerService(AbsBizBundleFamilyService.class, new BizBundleFamilyServiceImpl());

Thewhitelight commented 4 years ago

设置之后就应该没问题

Lelight-Iot commented 4 years ago

设置之后就应该没问题

抱歉,知道原因了。在跟Demo对比后发现,我这边没有更新那两个json文件

Lelight-Iot commented 4 years ago

反馈另外一个问题,就是设备被删除后,面板没有主动退出

Thewhitelight commented 4 years ago

删除设备后可以使用TuyaSdk.getEventBus().post(new PageCloseEventModel()); 关闭面板

Lelight-Iot commented 4 years ago

删除设备后可以使用TuyaSdk.getEventBus().post(new PageCloseEventModel()); 关闭面板

谢谢,可以了