plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}
apply from: '../shared_dependencies.gradle'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
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"
doNotStrip "*/*/libDJIFlySafeCore.so"
doNotStrip "*/*/libdjifs_jni.so"
doNotStrip "*/*/libsfjni.so"
doNotStrip "*/*/libDJICommonJNI.so"
doNotStrip "*/*/libDJICSDKCommon.so"
doNotStrip "*/*/libDJIUpgradeCore.so"
doNotStrip "*/*/libDJIUpgradeJNI.so"
doNotStrip "*/*/libDJIWaypointV2Core.so"
doNotStrip "*/*/libAMapSDK_MAP_v6_9_2.so"
doNotStrip "*/*/libDJIMOP.so"
doNotStrip "*/*/libDJISDKLOGJNI.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'
pickFirst 'lib/*/libDJIFlySafeCore.so'
pickFirst 'lib/*/libdjifs_jni.so'
pickFirst 'lib/*/libsfjni.so'
exclude 'META-INF/proguard/okhttp3.pro'
exclude 'META-INF/rxjava.properties'
exclude 'assets/location_map_gps_locked.png'
exclude 'assets/location_map_gps_3d.png'
}
}
dependencies {
//DJI SDK
api('com.dji:dji-uxsdk:4.14', {
/**
* Comment the "library-anti-distortion" if your app does need Anti Distortion for Mavic 2 Pro and Mavic 2 Zoom.
* Comment the "fly-safe-database" if you do not need database for release, or we will download it when DJISDKManager.getInstance().registerApp
* is called.
* Both will greatly reduce the size of the APK.
*/
exclude module: 'library-anti-distortion'
exclude module: 'fly-safe-database'
/**
* Uncomment the following line to exclude amap from the app.
* Note that Google Play Store does not allow APKs that include this library.
*/
// exclude group: 'com.amap.api'
})
/**
* Uncomment the following block if you are using an SDK version does not match the UX SDK
* version above. For example, this could be used if the SDK has a minor release version
* ahead of the UX SDK.
*/
// implementation ('com.dji:dji-sdk:4.14', {
// /**
// * Uncomment the "library-anti-distortion" if your app does not need Anti Distortion for Mavic 2 Pro and Mavic 2 Zoom.
// * Uncomment the "fly-safe-database" if you need database for release, or we will download it when DJISDKManager.getInstance().registerApp
// * is called.
// * Both will greatly reduce the size of the APK.
// */
// exclude module: 'library-anti-distortion'
// exclude module: 'fly-safe-database'
//
// /**
// * Uncomment the following line to exclude amap from the app.
// * Note that Google Play Store does not allow APKs that include this library.
// */
// // exclude group: 'com.amap.api'
// })
compileOnly 'com.dji:dji-sdk-provided:4.14.1'
implementation(project(':lib-comm'))
implementation(project(':map-sdk'))
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
PreFlightStatusWidget不更新连接状态 ,其他的状态都是正常的,看日志是EventBus出问题了
我的环境如下:
build.gradle
layout
错误如下: