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.
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.
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:TuyaHomeSdk.init()
is being called fromonCreate()
in theMainApplication
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 thedoCommandNative
native function in it.