提交 4cc26110 authored 作者: 史晓晨's avatar 史晓晨

feat:调试Android地图展示(依赖环境,适配)

上级 ae2e7b48
...@@ -24,9 +24,9 @@ if (flutterVersionName == null) { ...@@ -24,9 +24,9 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file("app/key.properties") //def keystorePropertiesFile = rootProject.file("app/key.properties")
def keystoreProperties = new Properties() //def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) //keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion 31 compileSdkVersion 31
...@@ -38,31 +38,31 @@ android { ...@@ -38,31 +38,31 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.amap.flutter.test_map" applicationId "com.amap.flutter.test_map"
minSdkVersion 16 minSdkVersion flutter.minSdkVersion
targetSdkVersion 31 targetSdkVersion 31
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
} }
signingConfigs { // signingConfigs {
release { // release {
//keystore中key的别名 // //keystore中key的别名
keyAlias keystoreProperties['keyAlias'] // keyAlias keystoreProperties['keyAlias']
//keystore中key的密码 // //keystore中key的密码
keyPassword keystoreProperties['keyPassword'] // keyPassword keystoreProperties['keyPassword']
//keystore的文件路径,可以是绝对路径也可以是相对路径 // //keystore的文件路径,可以是绝对路径也可以是相对路径
storeFile file(keystoreProperties['storeFile']) // storeFile file(keystoreProperties['storeFile'])
//keystore的密码l // //keystore的密码l
storePassword keystoreProperties['storePassword'] // storePassword keystoreProperties['storePassword']
} // }
} // }
buildTypes { buildTypes {
debug { // debug {
signingConfig signingConfigs.release // signingConfig signingConfigs.release
} // }
release { // release {
// flutter build apk // // flutter build apk
signingConfig signingConfigs.release // signingConfig signingConfigs.release
} // }
} }
sourceSets { sourceSets {
main { main {
...@@ -73,6 +73,7 @@ android { ...@@ -73,6 +73,7 @@ android {
dependencies { dependencies {
//demo中引入高德地图SDK //demo中引入高德地图SDK
implementation 'com.amap.api:3dmap:8.1.0' implementation 'com.amap.api:3dmap:8.1.0'
implementation 'com.amap.api:search:8.1.0'
} }
flutter { flutter {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
android:value="6a158bd9bdede0d4276a7ab4fc45ca1b" /> android:value="6a158bd9bdede0d4276a7ab4fc45ca1b" />
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
......
...@@ -5,7 +5,7 @@ buildscript { ...@@ -5,7 +5,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:7.3.0'
} }
} }
...@@ -24,6 +24,6 @@ subprojects { ...@@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论