Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DJI-SDK Failed resolution of: Lorg/apache/http/params/BasicHttpParams;

After updating my phone to Android 9, and updating the sdk version to 4.8.1, i am having an issue while trying to register the 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)

Is there another dependency that needs to be updated? Or currently version 4.8.1 is not stable yet for android 9?

My device - OnePlus 6T

like image 867
Fima Taf Avatar asked Jan 10 '19 10:01

Fima Taf


1 Answers

The reason for the issue is Apache HTTP client deprecation beginning with Android 9.

Add this to your AndroidManifest.xml to fix:

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
like image 136
dzikovskyy Avatar answered Oct 24 '22 02:10

dzikovskyy