tuya / tuya-android-industry-app-sdk-sample

This sample provides examples of Tuya Industry App SDK basic functions such as device network configuration, login and registration, and asset management of Tuya Open API.
MIT License
0 stars 0 forks source link

Crash in React Native app on emulator #12

Closed kellyschrock closed 2 years ago

kellyschrock commented 2 years ago

I have a React Native app using com.tuya.smart:tuyasmart:3.36.1 and it works fine on a real device, but crashes when I launch on an emulator with the following error:

10-10 08:57:59.762  7415  7415 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for java.lang.Object com.tuya.smart.security.jni.SecureNativeApi.doCommandNative(android.content.Context, int, byte[], byte[], boolean, boolean) (tried Java_com_tuya_smart_security_jni_SecureNativeApi_doCommandNative and Java_com_tuya_smart_security_jni_SecureNativeApi_doCommandNative__Landroid_content_Context_2I_3B_3BZZ)
 at com.tuya.smart.security.jni.SecureNativeApi.doCommandNative(Native Method)
 at com.tuya.smart.security.jni.JNICLibrary.doCommandNative(JNICLibrary.java:55)
 at com.tuya.sdk.network.TuyaNetworkSecurity.initJNI(TuyaNetworkSecurity.java:9)
 at com.tuya.smart.android.network.TuyaSmartNetWork.initialize(TuyaSmartNetWork.java:35)
 at com.tuya.smart.sdk.TuyaSdk.initTuyaData(TuyaSdk.java:81)
 at com.tuya.smart.sdk.TuyaSdk.init(TuyaSdk.java:220)
 at com.tuya.smart.sdk.TuyaSdk.init(TuyaSdk.java:60)
 at com.tuya.smart.home.sdk.TuyaHomeSdk.init(TuyaHomeSdk.java:107)
...

TuyaHomeSdk.init() is being called from onCreate() in the MainApplication class in my app. Any idea why it would crash on the emulator? All of the .so files appear to be present, including one of them (libjnimain.so) that does have the doCommandNative native function in it.

radishwu commented 2 years ago

We are very sorry, we suggest you move here to ask your question: https://service.console.tuya.com/8/3/create?step=4&id=01030408&source=suspension,to provide you with one-on-one guidance to match.