iotivity-lite
iotivity-lite copied to clipboard
Build for Android Api 27 leads to "UnsatisfiedLinkError: dlopen failed: cannot locate symbol "oc_is_owned_device""
Build for Android Api 27 leads to "UnsatisfiedLinkError: dlopen failed: cannot locate symbol "oc_is_owned_device"" Open
Build for Android Api 27 leads to "UnsatisfiedLinkError: dlopen failed: cannot locate symbol "oc_is_owned_device""
Hello,
I have followed the step to build iotivity-lite for Android as explained here: https://iotivity.org/documentation/building-iotivity-android
The command used to generate it was: make NDK_HOME=~/android-build/android-arm64-27 ANDROID_API=27 ANDROID_ABI=arm64-v8a IPV4=1 DEBUG=1 SECURE=0
Then I added the iotivity-lite.jar to my libs folder and the libiotivity-lite-jni.so to the src/main/jniLibs/arm64-v8a.
When I run the app and try to init the stack (dummy code for now):
OcPlatform.getInstance().systemInit(object : OCMainInitHandler { override fun initialize(): Int { Log.d("AAAAA", "MyClass-initialize: ") return 0 // TODO("Not yet implemented") }
override fun registerResources() {
Log.d("AAAAA", "MyClass-registerResources: ")
// TODO("Not yet implemented") }
override fun requestEntry() {
Log.d("AAAAA", "MyClass-requestEntry: ")
// TODO("Not yet implemented") }
})
I get the following error:
2020-09-11 22:22:50.787 23689-23689/my.app.package W/System.err: Native code library failed to load. 2020-09-11 22:22:50.787 23689-23689/my.app.package W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "oc_is_owned_device" referenced by "/data/app/my.app.package-cinCjuUX7hShiEk9-VBcaw==/lib/arm64/libiotivity-lite-jni.so"... Can anyone point me what I could be doing wrong?
Drop or upload designs to attach
Linked issues 0
Andre Peixoto Andre Peixoto @ampeixoto · 7 months ago After I removed the SECURE=0 from the make command, this error stopped but a new one raises:
2020-09-14 17:30:58.352 15950-16588/my.app.package W/System.err: Native code library failed to load. 2020-09-14 17:30:58.352 15950-16588/my.app.package W/System.err: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "coap_remove_observers_on_dos_change" referenced by "/data/app/my.app.package-20v-zis4z74eD6sngNv9yw==/base.apk!/lib/arm64-v8a/libiotivity-lite-jni.so"... Edited by Andre Peixoto 7 months ago