Mobile SDK4.16.3版本调用registerApp方法出行崩溃
已完成Process: cn.yoline.djidemo, PID: 32399
java.lang.VerifyError: Verifier rejected class dji.thirdparty.afinal.FinalHttp: org.apache.http.client.HttpClient dji.thirdparty.afinal.FinalHttp.getHttpClient() failed to verify: org.apache.http.client.HttpClient dji.thirdparty.afinal.FinalHttp.getHttpClient(): [0x2] can't resolve returned type 'Unresolved Reference: org.apache.http.client.HttpClient' or 'Unresolved Reference: org.apache.http.impl.client.DefaultHttpClient' (declaration of 'dji.thirdparty.afinal.FinalHttp' appears in /data/user/0/cn.yoline.djidemo/Anonymous-DexFile@838409424.jar)
at com.dji.frame.util.V_AppUtils.getFinalHttpWithSSL(Unknown Source:7)
at com.dji.frame.util.V_AppUtils.getFinalHttp(Unknown Source:7)
at dji.internal.version.nhf.fdd(Unknown Source:42)
at dji.internal.version.dgh.fdd(Unknown Source:8)
at dji.internal.version.VersionController.fdd(Unknown Source:10)
at dji.sdksharedlib.fdd.fdd(Unknown Source:23)
at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:15)
at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:27)
at dji.sdk.sdkmanager.DJISDKManager.registerApp(Unknown Source:37)
at dji.sdk.sdkmanager.DJISDKManager.access$1400(Unknown Source:0)
at dji.sdk.sdkmanager.DJISDKManager$8.onDownloadSuccess(Unknown Source:6)
at dji.internal.jhg.fdd.fdd(Unknown Source:19)
at dji.sdk.sdkmanager.DJISDKManager.lambda$registerApp$2(Unknown Source:27)
at dji.sdk.sdkmanager.DJISDKManager$$Lambda$4.run(Unknown Source:2)
at dji.sdksharedlib.dgh.dgh$fdd.run(Unknown Source:5)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
-
可以下载一下我们的Sample对比一下是不是少了什么库。 Link:https://github.com/dji-sdk/Mobile-SDK-Android -
Ok, so I've faced the same issue (btw sorry, but referencing the sample app didn't help at all). I was doing everything as mentioned in the "Integrate SDK into Application" section and I kept getting the above error all the time.
After hours of searching for the solution, I found the dependency which I consider the holy grail, as it finally fixed the issue:
api("com.github.ok2c.hc4.android:httpclient-android:0.1.0")
when I added this line, the app finally stopped crashing.
Hope someone finds this helpful. I'm leaving it here, as it was pretty much the only result after googling the error. Cheers
请先登录再写评论。
评论
3 条评论