【发布时间】:2019-01-30 13:59:01
【问题描述】:
我一直在使用移动 SDK 教程
我得到了它的工作。
我开始尝试将 UX SDK 集成到这个项目中(这是我在上面构建的原始应用程序)。我正在关注这个:
这样做。
我已经在 gradle 脚本中包含了两个 sdk:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.dji.ImportSDKDemo"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true // allows debug version to be bigger than allowed
}
buildTypes {
release {
shrinkResources true
minifyEnabled true // release version will go through shrinking process
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
}
packagingOptions{
doNotStrip "*/*/libdjivideo.so"
doNotStrip "*/*/libSDKRelativeJNI.so"
doNotStrip "*/*/libFlyForbid.so"
doNotStrip "*/*/libduml_vision_bokeh.so"
doNotStrip "*/*/libyuv2.so"
doNotStrip "*/*/libGroudStation.so"
doNotStrip "*/*/libFRCorkscrew.so"
doNotStrip "*/*/libUpgradeVerify.so"
doNotStrip "*/*/libFR.so"
pickFirst 'lib/*/libstlport_shared.so'
pickFirst 'lib/*/libRoadLineRebuildAPI.so'
pickFirst 'lib/*/libGNaviUtils.so'
pickFirst 'lib/*/libGNaviMapex.so'
pickFirst 'lib/*/libGNaviData.so'
pickFirst 'lib/*/libGNaviMap.so'
pickFirst 'lib/*/libGNaviSearch.so'
exclude 'META-INF/rxjava.properties'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.3' // allows debug version to be bigger than allowed
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
/*
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
*/
implementation 'com.amap.api:map2d:5.2.0'
implementation 'com.amap.api:3dmap:5.5.0'
implementation 'com.amap.api:search:5.5.0'
implementation 'com.amap.api:location:3.6.1'
//implementation files('libs/HERE-sdk-3.8.0.aar') // HERE maps
implementation ('com.dji:dji-sdk:4.9')
implementation ('com.dji:dji-uxsdk:4.9')
compileOnly ('com.dji:dji-sdk-provided:4.9')
}
我还没有开始使用来自 UX SDK 的任何调用,只是想看看它是否会构建和安装。它确实在 Android 设备上构建和安装,但不再注册。我在应用程序上得到以下信息
“注册sdk失败”
包名和applicationId没有改变(在build.gradle和AndroidManifest.xml中都是一样的)。
这是因为我要加载两个 SDK 吗?如果是这样,我需要两个 SDK 吗?如果所有功能都是其中之一,我会只使用一个。
然后我重新生成了一个 APP ID 以用于这个特定的应用程序,但这没有帮助。
谢谢...
【问题讨论】: