Closed kwong93 closed 7 years ago
I opened the dji-sdk.aar file (got this from https://github.com/dji-sdk/Mobile-UILibrary-Android/tree/master/libs) and I see the gson dependency dji-sdk.aar\classes.jar\com\google\gson\
and also I see another module dji.thirdparty.gson.
Question is which one is being used? I did a brief scan and I don't see any references to com.google.json I would like to remove the com.google.gson completely from classes.jar and remake the aar to see if will solve the conflict
Edit:
I removed google/ folder from classes.jar using 7zip and tried to build again and it worked, I tested the functions I had like view captures and take photo and they all work, but I don't know if it breaks other functions I wasn't using
Hi @kwong93, please try the logIntoDJIUserAccount interface to test if it works, if so, you are good to go.
For the gson dependency "dji-sdk.aar\classes.jar\com\google\gson\", currently, we don't plan to remove it in our SDK.
@oliverou Is logging in required to use drone capabilities? What is the difference for a logged in user and and an anonymous user using my app with dji integration?
Hi @kwong93, the login and application activation is required for users in China, please check the introduction section of this tutorial: Application Activation and Aircraft Binding.
@kwong93 I believe the build issue you're having is a transitive dependency conflict between the version of Gson being used by com.squareup.retrofit2:converter-gson
and the version being used by ':dji-uilibrary'
You could look into using a Gradle command to exclude the command package under - documented here 25.4.7. Excluding transitive dependencies
https://docs.gradle.org/3.3/userguide/dependency_management.html
Maybe the UI Library should use a Gradle provided
scope to rely on compile time dependencies from the mobile SDK - otherwise a user using both the SDK and the UI library will ship 2 versions of Gson.
It's also not very friendly to people just getting started as multiple namespace paths for the same library can be confusing and if not stripped out it may push them into having to maintain a multidex application which is a significantly slower experience.
Now that DJI has the sdks availabe via gradle, this is no longer an issue for me
compile 'com.dji:dji-sdk:4.3.2'
compile 'com.dji:dji-uilibrary:4.3.2'
Description of the issue. Cannot build signed APK because of duplicate entry. I can run the app fine in debug.
Crash logs (If you can find it, it would be very helpful)
Here are my gradle dependencies
I verified that I can build the signed APK when I commented out the DJI dependencies