DJI SDK 中 java.lang.UnsatisfiedLinkError

问题描述 投票:0回答:1

我在调用 DJI SDK 库函数时遇到

java.lang.UnsatisfiedLinkError: No implementation found for void
导致应用程序崩溃的问题。就我而言,我打电话给
FlyZoneManager.getInstance().downloadFlyZoneLicensesFromServer()
。具体错误是:

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)
android kotlin dji-sdk
1个回答
0
投票

应用程序未正确注册 - 确保首先调用

SDKManager.getInstance().registerApp()
,因为这在某种程度上与本机库链接相关。

示例代码:

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
}
© www.soinside.com 2019 - 2024. All rights reserved.