DJI-SDK无法解决以下问题:Lorg / apache / http / params / BasicHttpParams;

时间:2019-01-10 10:11:47

标签: android dji-sdk

将手机更新为Android 9,并将sdk版本更新为4.8.1之后,尝试注册sdk时出现问题:

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/params/BasicHttpParams;
    at dji.thirdparty.afinal.FinalHttp.<init>(Unknown Source:12)
    at com.dji.frame.util.V_AppUtils.b(Unknown Source:9)
    at dji.internal.version.b.a(Unknown Source:43)
    at dji.internal.version.d.a(Unknown Source:8)
    at dji.internal.version.VersionController.a(Unknown Source:12)
    at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:49)
    at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:129)
    at dji.sdk.sdkmanager.DJISDKManager.access$1100(Unknown Source:0)
    at dji.sdk.sdkmanager.DJISDKManager$5.run(Unknown Source:104)
    at java.lang.Thread.run(Thread.java:764)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.params.BasicHttpParams" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/base.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_resources_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_9_apk.apk", dex file "InMemoryDexFile[cookie=[0, 505806403584]]", dex file "InMemoryDexFile[cookie=[0, 505806404160]]"],nativeLibraryDirectories=[/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/lib/arm64, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/base.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at dji.thirdparty.afinal.FinalHttp.<init>(Unknown Source:12) 
    at com.dji.frame.util.V_AppUtils.b(Unknown Source:9) 
    at dji.internal.version.b.a(Unknown Source:43) 
    at dji.internal.version.d.a(Unknown Source:8) 
    at dji.internal.version.VersionController.a(Unknown Source:12) 
    at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:49) 
    at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:129) 
    at dji.sdk.sdkmanager.DJISDKManager.access$1100(Unknown Source:0) 
    at dji.sdk.sdkmanager.DJISDKManager$5.run(Unknown Source:104) 
    at java.lang.Thread.run(Thread.java:764) 
2019-01-10 12:02:39.820 8784-8840/com.paragon.defenders E/AndroidRuntime:   Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_resources_apk.apk
    at dalvik.system.DexFile.openDexFileNative(Native Method)
    at dalvik.system.DexFile.openDexFile(DexFile.java:354)
    at dalvik.system.DexFile.<init>(DexFile.java:101)
    at dalvik.system.DexFile.<init>(DexFile.java:75)
    at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
    at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
    at dalvik.system.DexPathList.<init>(DexPathList.java:164)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:83)
    at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
    at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
    at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
    at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
    at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
    at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:735)
    at android.app.LoadedApk.getClassLoader(LoadedApk.java:818)
    at android.app.LoadedApk.getResources(LoadedApk.java:1041)
    at android.app.ContextImpl.createAppContext(ContextImpl.java:2394)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5913)
    at android.app.ActivityThread.access$1300(ActivityThread.java:207)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1748)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

是否存在另一个需要更新的依赖项?还是当前版本4.8.1对于android 9来说还不稳定?

我的设备-OnePlus 6T

2 个答案:

答案 0 :(得分:2)

此问题的原因是Kivy Clock » Unscheduling从Android 9开始。

将此添加到您的AndroidManifest.xml中进行修复:

<uses-library android:name="org.apache.http.legacy" android:required="false"/>

答案 1 :(得分:0)

问题是我的compileSdkVersion28,当我在Android 9上运行该应用程序时,出现了此异常,我将其更改为26,该应用程序现在可以正常工作