更新demo工程AGP插件版本
This commit is contained in:
parent
3172244d39
commit
d95560df79
2
LICENSE
2
LICENSE
|
@ -1,5 +1,5 @@
|
||||||
Copyright 2023 kuloud
|
Copyright 2023 kuloud
|
||||||
Copyright <2020> <lbs.amap.com>
|
Copyright 2020 lbs.amap.com
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
10
README.md
10
README.md
|
@ -64,6 +64,16 @@ class _ShowMapPageState extends State<_ShowMapPageBody> {
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 已知问题
|
||||||
|
1. [android] app 的 targetSDKVersion >= 30, 地图页返回闪退
|
||||||
|
|
||||||
|
在里的AndroidManifest.xml里的application里增加`android:allowNativeHeapPointerTagging="false"`
|
||||||
|
```xml
|
||||||
|
<application android:allowNativeHeapPointerTagging="false">
|
||||||
|
...
|
||||||
|
</application>
|
||||||
|
```
|
||||||
|
google官方说明地址:https://source.android.com/devices/tech/debug/tagged-pointers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,9 @@ public class MapController
|
||||||
AMap.OnMapLongClickListener,
|
AMap.OnMapLongClickListener,
|
||||||
AMap.OnPOIClickListener {
|
AMap.OnPOIClickListener {
|
||||||
private static final String CLASS_NAME = "MapController";
|
private static final String CLASS_NAME = "MapController";
|
||||||
private static boolean hasStarted = false;
|
|
||||||
private final MethodChannel methodChannel;
|
private final MethodChannel methodChannel;
|
||||||
private final AMap amap;
|
private final AMap amap;
|
||||||
private final TextureMapView mapView;
|
private final TextureMapView mapView;
|
||||||
protected int[] myArray = {};
|
|
||||||
private MethodChannel.Result mapReadyResult;
|
private MethodChannel.Result mapReadyResult;
|
||||||
private boolean mapLoaded = false;
|
private boolean mapLoaded = false;
|
||||||
private boolean myLocationShowing = false;
|
private boolean myLocationShowing = false;
|
||||||
|
@ -147,10 +145,6 @@ public class MapController
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
LogUtil.e(CLASS_NAME, "onMapLoaded", e);
|
LogUtil.e(CLASS_NAME, "onMapLoaded", e);
|
||||||
}
|
}
|
||||||
if (LogUtil.isDebugMode && !hasStarted) {
|
|
||||||
hasStarted = true;
|
|
||||||
int index = myArray[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -68,6 +68,7 @@ android {
|
||||||
jniLibs.srcDirs = ['libs']
|
jniLibs.srcDirs = ['libs']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ndkVersion '25.1.8937393'
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
//demo中引入高德地图SDK
|
//demo中引入高德地图SDK
|
||||||
|
|
|
@ -10,11 +10,15 @@
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
android:maxSdkVersion="32" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
android:allowNativeHeapPointerTagging="false"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="amap_map_example">
|
android:label="amap_map_example">
|
||||||
|
@ -27,7 +31,8 @@
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize"
|
||||||
|
android:exported="true">
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
the Android process has started. This theme is visible to the user
|
the Android process has started. This theme is visible to the user
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.enableR8=true
|
#android.enableR8=true
|
||||||
|
|
|
@ -12,8 +12,8 @@ dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
permission_handler: ^6.1.3
|
permission_handler: ^11.1.0
|
||||||
flutter_plugin_android_lifecycle: ^2.0.0
|
flutter_plugin_android_lifecycle: ^2.0.17
|
||||||
|
|
||||||
amap_map:
|
amap_map:
|
||||||
# When depending on this package from a real application you should use:
|
# When depending on this package from a real application you should use:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: amap_map
|
name: amap_map
|
||||||
description: Amap SDK Flutter plugin
|
description: Amap SDK Flutter plugin for integrating AMapSDK in iOS and Android applications.
|
||||||
version: 1.0.0+5
|
version: 1.0.0+5
|
||||||
homepage: https://github.com/kuloud/amap_map
|
homepage: https://github.com/kuloud/amap_map
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_plugin_android_lifecycle: ^2.0.1
|
flutter_plugin_android_lifecycle: ^2.0.17
|
||||||
meta: ^1.3.0
|
meta: ^1.10.0
|
||||||
plugin_platform_interface: ^2.0.0
|
plugin_platform_interface: ^2.0.0
|
||||||
stream_transform: ^2.0.0
|
stream_transform: ^2.0.0
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ dependencies:
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
test: ^1.16.5
|
test: ^1.24.9
|
||||||
pedantic: ^1.11.0
|
pedantic: ^1.11.0
|
||||||
mockito: ^5.0.0-nullsafety.7
|
mockito: ^5.0.0-nullsafety.7
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue