Open ohaujingjing opened 4 years ago
Agent comment from Luce Luo in Zendesk ticket #33153:
Dear Customer,
Thank you for contacting DJI. To help us collect questions in detail, please fill in the form below and we will handle this ticket once we have received it. https://formcrafts.com/a/dji-developer-feedback-en
Thanks,
Luce Luo DJI Dev Team
@ohaujingjing 最近我这边上传航线也出现了这个问题,后来发现是更新到最新4.14-trial版本后,build.gradle少了一句"doNotStrip "//libDJISDKLOGJNI.so"", 这句是最新版新增的,github网页上没有明显给出提示! 添加这句之后重新编译release版就成功上传航线。 仅供参考~
Same issue here, and my build.gradle
has the doNotStrip "*/*/libDJISDKLOGJNI.so"
Do you guys have the same content as https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/proguard-rules.pro. If yes, please tell me how to reproduce the issue. This error commonly happen when you miss some settings in proguard-reles.pro.
@DJI-William Yes, my proguard-rules.pro
has the same content of the file you provided.
In my case, I use the SDK inside a lib project, so my build.gradle of this lib project has this code:
defaultConfig {
consumerProguardFiles 'proguard-rules.pro'
}
The app that uses this lib project has the following build.gradle code:
defaultConfig {
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
}
}
For me, the issue happens when I run a waypoint mission, so:
The step 4 will fail with The key does not match the format: component/index/key with index being a number or *.
OBS: If I disable the shrinkResources
and minifyEnabled
, the issue no longer happens.
OBS 2: I'm executing the app in release mode
@fernando-s97 This issue means the program cannot find the correct class to load which is caused by minifyEnabled and shrinkResources rules. This is why you will find it works when disable minifyEnabled and shrinkResources . The proguard-reles.pro defines what class files should be keep after minified. We need to look at the rules.
@DJI-William Yeah, I'm aware of that. I added that observation just to "prove" this problem only happens when minifyEnabled
and shrinkResources
is enabled, which therefore might indicate the problem is with the proguard rules, but as stated above, the proguard-rules.pro
is the same one you specified.
And just to avoid doubts, you're taking a look at this issue, or are waiting for some more info?
@fernando-s97 We have to reproduce on our site to solve this problem. However, running a waypointMission on our side does not trigger this error. We may need a reproduceable method on Android Sample.
Everything goes find when debug with proguard closed, but when I open proguard for release, the error shows.
The key does not match the format: component/index/key with index being a number or *.
I copyed the same file of proguard-rules.pro from the dji sample code: