Simple starter App for MSDK v5 Android
CompletedHello,
I want to build a very simple, functioning MSDK Android app. This app should initially only stream video from the drone to my Android app, nothing more. I have already tried to run this example:
https://developer.dji.com/doc/mobile-sdk-tutorial/en/quick-start/user-project-caution.html
But unfortunately this example app cannot be run, my error in Android Studio:
Do you have any working starter project for me??
Thank you
-
Hello, yes, I have downloaded the complete example from this page https://developer.dji.com/doc/mobile-sdk-tutorial/en/quick-start/user-project-caution.html under the link:
https://terra-1-g.djicdn.com/71a7d383e71a4fb8887a310eb746b47f/msdk/SDKSample.zip
I have created first a new App Key for this project and added this on AndroidManifest.xml
<meta-data
android:name="com.dji.sdk.API_KEY"
android:value="My key is here"/>I am using the latest Android Studio Version: Android Studio Koala | 2024.1.1
Here ist the build.gradle file from example project:apply from:rootProject.file('dependencies.gradle')
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
// 推荐的Android Gradle Plugin版本,不做强求,可以自定适配需要的版本。但是如果你需要引入UXSDK框架,则建议使用推荐版本,否则可能会出现编译兼容性问题。
classpath 'com.android.tools.build:gradle:8.5.2'
//推荐的Kotlin版本,如果你需要引入UXSDK框架,则建议使用推荐版本,否则可能会出现编译兼容性问题
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21" //DJI MSDK 建议的版本
// ... (remaining code)
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}When I click on "run" button, I see first this message:
When I click on "Continue", I see this error message:I would be very happy, when we can solve this start problem. Thank you :)
-
I could find the solution here:
https://github.com/dji-sdk/Mobile-SDK-Android-V5/issues/401
then the next error could be fixed here:
https://sdk-forum.dji.net/hc/en-us/articles/28151970830745-How-should-I-resolve-the-issue-java-lang-NoClassDefFoundError-Failed-resolution-of-Ldji-v5-manager-interfaces-SDKManagerCallback
Thanks for your support.
Please sign in to leave a comment.
Comments
5 comments