Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
amap_flutter_location
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
amap_flutter_location
Commits
5201af11
提交
5201af11
authored
2月 03, 2026
作者:
史晓晨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
适配Flutter 3.38
上级
d57fa9f4
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
214 行增加
和
174 行删除
+214
-174
build.gradle
android/build.gradle
+0
-36
build.gradle.kts
android/build.gradle.kts
+47
-0
gradle.properties
android/gradle.properties
+1
-1
settings.gradle.kts
android/settings.gradle.kts
+0
-0
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+1
-3
build.gradle
example/android/app/build.gradle
+0
-71
build.gradle.kts
example/android/app/build.gradle.kts
+57
-0
AndroidManifest.xml
example/android/app/src/debug/AndroidManifest.xml
+2
-3
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+12
-13
AndroidManifest.xml
example/android/app/src/profile/AndroidManifest.xml
+2
-3
build.gradle
example/android/build.gradle
+0
-29
build.gradle.kts
example/android/build.gradle.kts
+24
-0
gradle.properties
example/android/gradle.properties
+1
-1
gradle-wrapper.properties
example/android/gradle/wrapper/gradle-wrapper.properties
+2
-1
settings.gradle
example/android/settings.gradle
+0
-11
settings.gradle.kts
example/android/settings.gradle.kts
+26
-0
flutter_lldb_helper.py
example/ios/Flutter/ephemeral/flutter_lldb_helper.py
+32
-0
flutter_lldbinit
example/ios/Flutter/ephemeral/flutter_lldbinit
+5
-0
pubspec.yaml
example/pubspec.yaml
+2
-2
没有找到文件。
android/build.gradle
deleted
100644 → 0
浏览文件 @
d57fa9f4
group
'com.amap.flutter.amap_flutter_location'
version
'1.0'
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.1'
}
}
rootProject
.
allprojects
{
repositories
{
google
()
jcenter
()
}
}
apply
plugin:
'com.android.library'
android
{
compileSdkVersion
31
defaultConfig
{
minSdkVersion
16
}
lintOptions
{
disable
'InvalidPackage'
}
dependencies
{
compileOnly
'com.amap.api:location:5.6.0'
}
}
android/build.gradle.kts
0 → 100644
浏览文件 @
5201af11
group = "com.amap.flutter.amap_flutter_location"
version = "1.0-SNAPSHOT"
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
plugins {
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "com.amap.flutter.location"
compileSdk = flutter.compileSdkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
minSdk = flutter.minSdkVersion
}
dependencies {
compileOnly("com.amap.api:location:5.6.0")
}
}
android/gradle.properties
浏览文件 @
5201af11
org.gradle.jvmargs
=
-Xmx
1536
M
org.gradle.jvmargs
=
-Xmx
2048
M
android.useAndroidX
=
true
android.enableJetifier
=
true
android.enableR8
=
true
android/settings.gradle
→
android/settings.gradle
.kts
浏览文件 @
5201af11
File moved
android/src/main/AndroidManifest.xml
浏览文件 @
5201af11
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.amap.flutter.location"
>
</manifest>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
></manifest>
example/android/app/build.gradle
deleted
100644 → 0
浏览文件 @
d57fa9f4
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
if
(
localPropertiesFile
.
exists
())
{
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'
)
if
(
flutterVersionCode
==
null
)
{
flutterVersionCode
=
'1'
}
def
flutterVersionName
=
localProperties
.
getProperty
(
'flutter.versionName'
)
if
(
flutterVersionName
==
null
)
{
flutterVersionName
=
'1.0'
}
apply
plugin:
'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
compileSdkVersion
31
lintOptions
{
disable
'InvalidPackage'
}
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'com.amap.api:location:5.6.0'
}
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"
minSdkVersion
16
targetSdkVersion
31
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
}
signingConfigs
{
debug
{
//keystore中key的别名
keyAlias
'androiddebugkey'
//keystore中key的密码
keyPassword
'android'
//keystore的文件路径,可以是绝对路径也可以是相对路径
storeFile
file
(
'../../debug.keystore'
)
//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
'../..'
}
example/android/app/build.gradle.kts
0 → 100644
浏览文件 @
5201af11
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.amap.flutter.amap_flutter_location_example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
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"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
// signingConfigs {
// create("debug") {
// 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.getByName("debug")
}
}
dependencies {
implementation("com.amap.api:location:5.6.0")
}
}
flutter {
source = "../.."
}
example/android/app/src/debug/AndroidManifest.xml
浏览文件 @
5201af11
<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.
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
5201af11
<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
...
...
@@ -13,17 +12,19 @@
<uses-permission
android:name=
"android.permission.READ_PHONE_STATE"
/>
<uses-permission
android:name=
"android.permission.CHANGE_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<application
android:name=
"${applicationName}"
android:
label=
"amap_flutter_location_example
"
android:
icon=
"@mipmap/ic_launcher
"
>
<service
android:name=
"com.amap.api.location.APSService"
/>
android:
icon=
"@mipmap/ic_launcher
"
android:
label=
"amap_flutter_location_example
"
>
<service
android:name=
"com.amap.api.location.APSService"
/>
<activity
android:name=
".MainActivity"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:exported=
"true"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:windowSoftInputMode=
"adjustResize"
>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
...
...
@@ -31,8 +32,7 @@
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name=
"io.flutter.embedding.android.NormalTheme"
android:resource=
"@style/NormalTheme"
/>
android:resource=
"@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
...
...
@@ -40,11 +40,10 @@
Flutter's first frame. -->
<meta-data
android:name=
"io.flutter.embedding.android.SplashScreenDrawable"
android:resource=
"@drawable/launch_background"
/>
android:resource=
"@drawable/launch_background"
/>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
...
...
example/android/app/src/profile/AndroidManifest.xml
浏览文件 @
5201af11
<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.
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
example/android/build.gradle
deleted
100644 → 0
浏览文件 @
d57fa9f4
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.0'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
}
}
rootProject
.
buildDir
=
'../build'
subprojects
{
project
.
buildDir
=
"${rootProject.buildDir}/${project.name}"
}
subprojects
{
project
.
evaluationDependsOn
(
':app'
)
}
task
clean
(
type:
Delete
)
{
delete
rootProject
.
buildDir
}
example/android/build.gradle.kts
0 → 100644
浏览文件 @
5201af11
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
example/android/gradle.properties
浏览文件 @
5201af11
org.gradle.jvmargs
=
-Xmx
1536
M
org.gradle.jvmargs
=
-Xmx
2048
M
android.useAndroidX
=
true
android.enableJetifier
=
true
android.enableR8
=
true
example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
5201af11
...
...
@@ -3,4 +3,4 @@ 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-
8.14
-all.zip
\ No newline at end of file
example/android/settings.gradle
deleted
100644 → 0
浏览文件 @
d57fa9f4
include
':app'
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
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"
example/android/settings.gradle.kts
0 → 100644
浏览文件 @
5201af11
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")
example/ios/Flutter/ephemeral/flutter_lldb_helper.py
0 → 100644
浏览文件 @
5201af11
#
# Generated file, do not edit.
#
import
lldb
def
handle_new_rx_page
(
frame
:
lldb
.
SBFrame
,
bp_loc
,
extra_args
,
intern_dict
):
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
base
=
frame
.
register
[
"x0"
]
.
GetValueAsAddress
()
page_len
=
frame
.
register
[
"x1"
]
.
GetValueAsUnsigned
()
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
# first page to see if handled it correctly. This makes diagnosing
# misconfiguration (e.g. missing breakpoint) easier.
data
=
bytearray
(
page_len
)
data
[
0
:
8
]
=
b
'IHELPED!'
error
=
lldb
.
SBError
()
frame
.
GetThread
()
.
GetProcess
()
.
WriteMemory
(
base
,
data
,
error
)
if
not
error
.
Success
():
print
(
f
'Failed to write into {base}[+{page_len}]'
,
error
)
return
def
__lldb_init_module
(
debugger
:
lldb
.
SBDebugger
,
_
):
target
=
debugger
.
GetDummyTarget
()
# Caveat: must use BreakpointCreateByRegEx here and not
# BreakpointCreateByName. For some reasons callback function does not
# get carried over from dummy target for the later.
bp
=
target
.
BreakpointCreateByRegex
(
"^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$"
)
bp
.
SetScriptCallbackFunction
(
'{}.handle_new_rx_page'
.
format
(
__name__
))
bp
.
SetAutoContinue
(
True
)
print
(
"-- LLDB integration loaded --"
)
example/ios/Flutter/ephemeral/flutter_lldbinit
0 → 100644
浏览文件 @
5201af11
#
# Generated file, do not edit.
#
command script import --relative-to-command-file flutter_lldb_helper.py
example/pubspec.yaml
浏览文件 @
5201af11
...
...
@@ -11,7 +11,7 @@ environment:
dependencies
:
flutter
:
sdk
:
flutter
permission_handler
:
^
6.1.3
permission_handler
:
^
12.0.1
amap_flutter_location
:
# When depending on this package from a real application you should use:
...
...
@@ -23,7 +23,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons
:
^1.0.
0
cupertino_icons
:
^1.0.
2
dev_dependencies
:
flutter_test
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论