首页 文章

DJI SDK 4.5.1发布版本崩溃

提问于
浏览
0

我创建一个Android应用程序来控制DJI无人机 . 我刚刚更新到DJI SDK 4.5.1,当我将构建变量设置为'Debug'时,应用程序正在按预期工作 . 当我将'minifyEnabled'更改为'release'版本为'true'和proguard文件时,应用程序在设置权限后崩溃 . 如果我将'minifyEnabled'更改为'false',那么应用程序运行时没有任何错误 .

在SDK 4.5.1更新之前,应用程序工作正常(将'minifyEnabled'改为'true')

我检查了DJI的Mobile SDK教程(https://github.com/DJI-Mobile-SDK-Tutorials/Android-GEODemo)是否有同样的问题,当我在教程项目中将minifyEnabled更改为'true'时发生了同样的错误 .

我得到的错误如下:

java.lang.NoClassDefFoundError:解析失败:Lokio / Buffer; at dji.thirdparty.okhttp3.ResponseBody.create(Unknown Source)at dji.thirdparty.okhttp3.internal.Util . (Unknown Source)at dji.thirdparty.okhttp3.internal.Util.immutableList(Unknown Source)at dji.thirdparty . okhttp3.OkHttpClient . (未知来源)at dji.thirdparty.okhttp3.OkHttpClient $ Builder . (Unknown Source)引起:java.lang.ClassNotFoundException:路径上没有找到类“okio.Buffer”:DexPathList [[zip file] “/system/framework/com.android.future.usb.accessory.jar”,]](带有更多的zip文件参考)

我正在使用DJI用于他们的教程项目的proguard文件,其中我添加了一些额外的行(https://github.com/DJI-Mobile-SDK-Tutorials/Android-GEODemo/blob/master/GEODemo/app/proguard-rules.pro

一切都指向proguard文件,但我已经没有想法,这就是为什么我来这里寻求帮助=)

最诚挚的问候KevinG

1 回答

  • 0

    我一直与DJI联系,他们为我提供了一个有效的更新 .

    他们用以下内容更新了他们的proguard文件:

    -keep class okio.** { *; }
    -keep class org.bouncycastle.** { *; }
    

    他们改变了org.boundcycastle

    -keep,allowshrinking class org.bouncycastle.** { *; }
    

    我之前写的 . (但保持两者对我有用)

    /凯文

相关问题