更新demo工程AGP插件版本

This commit is contained in:
Kuloud 2023-12-26 11:56:49 +08:00
parent 3172244d39
commit d95560df79
9 changed files with 30 additions and 20 deletions

View File

@ -1,5 +1,5 @@
Copyright 2023 kuloud
Copyright <2020> <lbs.amap.com>
Copyright 2020 lbs.amap.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -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

View File

@ -43,11 +43,9 @@ public class MapController
AMap.OnMapLongClickListener,
AMap.OnPOIClickListener {
private static final String CLASS_NAME = "MapController";
private static boolean hasStarted = false;
private final MethodChannel methodChannel;
private final AMap amap;
private final TextureMapView mapView;
protected int[] myArray = {};
private MethodChannel.Result mapReadyResult;
private boolean mapLoaded = false;
private boolean myLocationShowing = false;
@ -147,10 +145,6 @@ public class MapController
} catch (Throwable e) {
LogUtil.e(CLASS_NAME, "onMapLoaded", e);
}
if (LogUtil.isDebugMode && !hasStarted) {
hasStarted = true;
int index = myArray[0];
}
}
@Override

View File

@ -68,6 +68,7 @@ android {
jniLibs.srcDirs = ['libs']
}
}
ndkVersion '25.1.8937393'
}
dependencies {
//demo中引入高德地图SDK

View File

@ -10,11 +10,15 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<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_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_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" />
<application
android:allowNativeHeapPointerTagging="false"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:label="amap_map_example">
@ -27,7 +31,8 @@
android:hardwareAccelerated="true"
android:launchMode="singleTop"
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
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues

View File

@ -1,18 +1,18 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

View File

@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
#android.enableR8=true

View File

@ -12,8 +12,8 @@ dependencies:
flutter:
sdk: flutter
permission_handler: ^6.1.3
flutter_plugin_android_lifecycle: ^2.0.0
permission_handler: ^11.1.0
flutter_plugin_android_lifecycle: ^2.0.17
amap_map:
# When depending on this package from a real application you should use:

View File

@ -1,5 +1,5 @@
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
homepage: https://github.com/kuloud/amap_map
@ -10,8 +10,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^2.0.1
meta: ^1.3.0
flutter_plugin_android_lifecycle: ^2.0.17
meta: ^1.10.0
plugin_platform_interface: ^2.0.0
stream_transform: ^2.0.0
@ -21,7 +21,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.16.5
test: ^1.24.9
pedantic: ^1.11.0
mockito: ^5.0.0-nullsafety.7