一定要注意高德NDK的导入
还有一定一定要把 其他类里面的compile fileTree(dir: ‘libs’, include: [’*.jar’])删除干净,不然会出现黑屏bug
defaultConfig {
ndk {
//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
applicationId "com.dji.GSDemo.GaodeMap"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//3D地图so及jar
compile 'com.amap.api:3dmap:latest.integration'
//定位功能
compile 'com.amap.api:location:latest.integration'
//搜索功能
compile 'com.amap.api:search:latest.integration'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
compile ('com.dji:dji-sdk:4.10')
provided ('com.dji:dji-sdk-provided:4.10')
implementation 'com.android.support:multidex:1.0.3'
}
关于按键背景颜色图片和半透明的设置
按键的整体透明度
private Button btn_locate;
btn_locate=findViewById(R.id.locate);
btn_locate.getBackground().setAlpha(100);
按键颜色的透明度
在main.xml里面加入
就可以了
半透明<Button android:background="#e0000000" … />
透明<Button android:background="#00000000" … />
##按键并不能自己加图片然后后面又有按键的按下和
不按下的变化,可以用lmage view和button组合合成,目前没有其他办法。