I'm getting java.lang.UnsatisfiedLinkError: No implementation found for void
causing an app crash when calling a DJI SDK library function. In my case I'm calling FlyZoneManager.getInstance().downloadFlyZoneLicensesFromServer()
. The specific error is:
java.lang.UnsatisfiedLinkError: No implementation found for void dji.csdk.fscore.jni.unlock.JNIFSUnlockManager.native_fetchServerLicense(dji.component.flysafe.listener.JNIUnlockCommonCallbacks$JNIUnlockCommonCallbackWith) (tried Java_dji_csdk_fscore_jni_unlock_JNIFSUnlockManager_native_1fetchServerLicense and Java_dji_csdk_fscore_jni_unlock_JNIFSUnlockManager_native_1fetchServerLicense__Ldji_component_flysafe_listener_JNIUnlockCommonCallbacks_00024JNIUnlockCommonCallbackWith_2)
The app is not being registered properly - Make sure to call SDKManager.getInstance().registerApp()
first as this is somehow related to the native library linking. Nothing in the documentation or the error message suggests this relation but making sure this call was actually happening fixed this for me after hours of hair pulling.
Example code:
SDKManager.getInstance().init(applicationContext, object : SDKManagerCallback {
override fun onInitProcess(event: DJISDKInitEvent?, totalProcess: Int) {
Log.d(TAG, "onInitProcess: ")
if (event == DJISDKInitEvent.INITIALIZE_COMPLETE) {
SDKManager.getInstance().registerApp()
}
}
// Implement other callbacks
}