Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
amap_flutter_location
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
amap_flutter_location
Commits
de0af76c
提交
de0af76c
authored
6月 17, 2026
作者:
caoyongfeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
可运行适配
上级
d57fa9f4
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
73 行增加
和
77 行删除
+73
-77
build.gradle
android/build.gradle
+11
-7
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+1
-2
build.gradle
example/android/app/build.gradle
+29
-36
AndroidManifest.xml
example/android/app/src/debug/AndroidManifest.xml
+1
-2
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+2
-2
AndroidManifest.xml
example/android/app/src/profile/AndroidManifest.xml
+1
-2
build.gradle
example/android/build.gradle
+4
-15
gradle-wrapper.properties
example/android/gradle/wrapper/gradle-wrapper.properties
+1
-2
settings.gradle
example/android/settings.gradle
+22
-8
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
android/build.gradle
浏览文件 @
de0af76c
...
...
@@ -4,32 +4,36 @@ version '1.0'
buildscript
{
repositories
{
google
()
jcenter
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:
3.5.1
'
classpath
'com.android.tools.build:gradle:
7.4.2
'
}
}
rootProject
.
allprojects
{
repositories
{
google
()
jcenter
()
mavenCentral
()
}
}
apply
plugin:
'com.android.library'
android
{
compileSdkVersion
31
namespace
'com.amap.flutter.amap_flutter_location'
compileSdk
34
defaultConfig
{
minSdk
Version
16
minSdk
21
}
lintOptions
{
disable
'InvalidPackage'
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
dependencies
{
compileOnly
'com.amap.api:location:5.6.0'
}
...
...
android/src/main/AndroidManifest.xml
浏览文件 @
de0af76c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.amap.flutter.location"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
</manifest>
example/android/app/build.gradle
浏览文件 @
de0af76c
plugins
{
id
"com.android.application"
id
"kotlin-android"
id
"dev.flutter.flutter-gradle-plugin"
}
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
def
localPropertiesFile
=
rootProject
.
file
(
"local.properties"
)
if
(
localPropertiesFile
.
exists
())
{
localPropertiesFile
.
withReader
(
'UTF-8'
)
{
reader
->
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
localProperties
.
load
(
reader
)
}
}
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
def
flutterVersionCode
=
localProperties
.
getProperty
(
'flutter.versionCode'
)
def
flutterVersionCode
=
localProperties
.
getProperty
(
"flutter.versionCode"
)
if
(
flutterVersionCode
==
null
)
{
flutterVersionCode
=
'1'
flutterVersionCode
=
"1"
}
def
flutterVersionName
=
localProperties
.
getProperty
(
'flutter.versionName'
)
def
flutterVersionName
=
localProperties
.
getProperty
(
"flutter.versionName"
)
if
(
flutterVersionName
==
null
)
{
flutterVersionName
=
'1.0'
flutterVersionName
=
"1.0"
}
apply
plugin:
'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
compileSdkVersion
31
namespace
"com.amap.flutter.amap_flutter_location_example"
compileSdk
34
lintOptions
{
disable
'InvalidPackage'
}
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'com.amap.api:location:5.6.0'
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.amap.flutter.amap_flutter_location_example"
minSdk
Version
16
targetSdk
Version
31
minSdk
21
targetSdk
34
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
}
signingConfigs
{
debug
{
//keystore中key的别名
keyAlias
'androiddebugkey'
//keystore中key的密码
keyPassword
'android'
//keystore的文件路径,可以是绝对路径也可以是相对路径
storeFile
file
(
'../../debug.keystore'
)
//keystore的密码
storePassword
'android'
keyAlias
"androiddebugkey"
keyPassword
"android"
storeFile
file
(
"../../debug.keystore"
)
storePassword
"android"
}
}
buildTypes
{
release
{
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig
signingConfigs
.
debug
}
}
}
flutter
{
source
'../..'
source
"../.."
}
dependencies
{
implementation
"com.amap.api:location:5.6.0"
}
example/android/app/src/debug/AndroidManifest.xml
浏览文件 @
de0af76c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.amap.flutter.amap_flutter_location_example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
...
...
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
de0af76c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.amap.flutter.amap_flutter_location_example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
...
...
@@ -20,6 +19,7 @@
<service
android:name=
"com.amap.api.location.APSService"
/>
<activity
android:name=
".MainActivity"
android:exported=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
...
...
example/android/app/src/profile/AndroidManifest.xml
浏览文件 @
de0af76c
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.amap.flutter.amap_flutter_location_example"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
...
...
example/android/build.gradle
浏览文件 @
de0af76c
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.0'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
mavenCentral
()
}
}
rootProject
.
buildDir
=
'../build'
rootProject
.
buildDir
=
"../build"
subprojects
{
project
.
buildDir
=
"${rootProject.buildDir}/${project.name}"
}
subprojects
{
project
.
evaluationDependsOn
(
':app'
)
project
.
evaluationDependsOn
(
":app"
)
}
task
clean
(
type:
Delete
)
{
task
s
.
register
(
"clean"
,
Delete
)
{
delete
rootProject
.
buildDir
}
example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
de0af76c
#Fri Jun 23 08:50:38 CEST 2017
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
5.6.2
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
7.6.3
-all.zip
example/android/settings.gradle
浏览文件 @
de0af76c
include
':app'
pluginManagement
{
def
flutterSdkPath
=
{
def
properties
=
new
Properties
()
file
(
"local.properties"
).
withInputStream
{
properties
.
load
(
it
)
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
return
flutterSdkPath
}()
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
includeBuild
(
"$flutterSdkPath/packages/flutter_tools/gradle"
)
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
repositories
{
google
()
mavenCentral
()
gradlePluginPortal
()
}
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
apply
from:
"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins
{
id
"dev.flutter.flutter-plugin-loader"
version
"1.0.0"
id
"com.android.application"
version
"7.4.2"
apply
false
id
"org.jetbrains.kotlin.android"
version
"1.8.22"
apply
false
}
include
":app"
pubspec.yaml
浏览文件 @
de0af76c
...
...
@@ -4,7 +4,7 @@ version: 3.0.0
homepage
:
https://lbs.amap.com/
environment
:
sdk
:
"
>=2.12.0
<3.0.0"
sdk
:
'
>=3.3.4
<4.0.0'
flutter
:
"
>=1.20.0"
dependencies
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论