yohom / amap_search_fluttify Goto Github PK
View Code? Open in Web Editor NEW高德地图 搜索组件 Flutter插件
License: Other
高德地图 搜索组件 Flutter插件
License: Other
希望出 nullsafe 版本
插件版本
描述bug
复现步骤
期望行为
截图
flutter doctor
插件版本
0.8.2+1
遇到bug的平台(Android/iOS)
Android
描述bug
Unhandled Exception: PlatformException(Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, null)
E/flutter (24140): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (24140): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter (24140):
E/flutter (24140): #2 com_amap_api_services_geocoder_RegeocodeResult.getRegeocodeAddress (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/RegeocodeResult.g.dart:104:77)
E/flutter (24140): #3 _AndroidSearchListener.onRegeocodeSearched (package:amap_search_fluttify/src/facade/amap_search.dart:1096:31)
E/flutter (24140): #4 com_amap_api_services_geocoder_GeocodeSearch.setOnGeocodeSearchListener. (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/GeocodeSearch.g.dart:123:21)
E/flutter (24140): #5 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
E/flutter (24140): #6 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:370:54)
E/flutter (24140): #7 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
E/flutter (24140): #8 _invoke3. (dart:ui/hooks.dart:303:15)
E/flutter (24140): #9 _rootRun (dart:async/zone.dart:1126:13)
E/flutter (24140): #10 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter (24140): #11 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
E/flutter (24140): #12 _invoke3 (dart:ui/hooks.dart:302:10)
E/flutter (24140): #13 _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
复现步骤
期望行为
截图
flutter doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.4 18E226,
locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
功能描述
Native端对应字段/方法
你好,驾车、骑行、和步行的线路规划返回的是一些路径列表,能不能像高德地图app中那样在地图上显示规划的路径图,然后可以选择规划的路径图进行导航?
功能描述
AmapSearch.instance.searchDriveRoute
Native端对应字段/方法
final routeResult = await AmapSearch.instance.searchDriveRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
routeResult
.toFutureString() 实际上并不是一个json 对应后续处理很困难 能否已json格式返回 方便客户端的处理
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, null)
[ ] E/flutter (25277): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
[ ] E/flutter (25277):
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#2 com_amap_api_services_geocoder_RegeocodeResult.getRegeocodeAddress (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/RegeocodeResult.g.dart:102:73)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#3 _AndroidSearchListener.onRegeocodeSearched (package:amap_search_fluttify/src/dart/amap_search.dart:1094:31)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#4 com_amap_api_services_geocoder_GeocodeSearch.setOnGeocodeSearchListener. (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/GeocodeSearch.g.dart:121:21)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#5 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#6 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:370:54)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#7 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#8 _invoke3. (dart:ui/hooks.dart:303:15)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#9 _rootRun (dart:async/zone.dart:1126:13)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#10 _CustomZone.run (dart:async/zone.dart:1023:19)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#11 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#12 _invoke3 (dart:ui/hooks.dart:302:10)
[ ] E/flutter (25277): fluttify-project/amap_map_fluttify#13 _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
功能描述
输入提示功能 AMapSearch.fetchInputTips()
方法的返回值是InputTip
类型,可以增加一个latLng
字段来表示该地点的经纬度。
Native端对应字段/方法
AMapTip
类有一个属性为 Location
,该属性类型为 AMapGeoPoint
。
http://a.amap.com/lbs/static/unzip/iOS_Map_Doc/AMap_iOS_API_Doc_Search/interface_a_map_tip.html
Tip
类有一个属性 Point
,该属性类型为 LatLonPoint
。
http://a.amap.com/lbs/static/unzip/Android_Map_Doc/index.html?Search/com/amap/api/services/help/Tip.html
插件版本
amap_search_fluttify: 0.7.9+481e45c
amap_map_fluttify: 0.18.2+c038d50
遇到bug的平台(Android/iOS)
Android
描述bug
APP安装后首次打开,进入地图页面,无法搜索,控制台报错,返回再次进入就可以了,
报错内容:
E/flutter (14295): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, null)
E/flutter (14295): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (14295): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter (14295): <asynchronous suspension>
E/flutter (14295): #2 com_amap_api_services_poisearch_PoiResult.getPois (package:amap_search_fluttify/src/android/com/amap/api/services/poisearch/PoiResult.g.dart:128:73)
E/flutter (14295): #3 _AndroidSearchListener.onPoiSearched (package:amap_search_fluttify/src/dart/amap_search.dart:1053:38)
E/flutter (14295): #4 com_amap_api_services_poisearch_PoiSearch.setOnPoiSearchListener.<anonymous closure> (package:amap_search_fluttify/src/android/com/amap/api/services/poisearch/PoiSearch.g.dart:77:21)
E/flutter (14295): #5 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
E/flutter (14295): #6 MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:370:54)
E/flutter (14295): #7 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
E/flutter (14295): #8 _invoke3.<anonymous closure> (dart:ui/hooks.dart:303:15)
E/flutter (14295): #9 _rootRun (dart:async/zone.dart:1126:13)
E/flutter (14295): #10 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter (14295): #11 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
E/flutter (14295): #12 _invoke3 (dart:ui/hooks.dart:302:10)
E/flutter (14295): #13 _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
E/flutter (14295):
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.43.1)
[✓] Connected device (1 available)
功能描述
逆向地理编码
Native端对应字段/方法
aois | aoi信息列表 | 请求参数 extensions 为 all 时返回如下内容 |
---|---|---|
aoi | aoi信息 | |
id | 所属 aoi的id | |
name | 所属 aoi 名称 | |
adcode | 所属 aoi 所在区域编码 | |
location | 所属 aoi 中心点坐标 | |
area | 所属aoi点面积 | 单位:平方米 |
distance | 输入经纬度是否在aoi面之中 | 0,代表在aoi内其余整数代表距离AOI的距离 |
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://download.flutter.io)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
ios主要有这两种情况:
1、如果是原生输入法,可以根据定位获取到的当前坐标,调用AmapSearch.instance.searchAround(latLng)查询到结果列表,但是通过输入框输入关键字,然后调用AmapSearch.instance.searchKeyword(keyword)则直接崩溃;
2、如果是切到第三方输入法,例如搜狗输入法,调用AmapSearch.instance.searchAround(latLng)查询不到结果列表,但是通过输入框输入关键字,然后调用AmapSearch.instance.searchKeyword(keyword)却可以搜索到结果列表
sortrule 规定返回结果的排序规则。按距离排序:distance;综合排序:weight
插件版本
遇到bug的平台(Android/iOS)
描述bug
复现步骤
期望行为
截图
flutter doctor
插件版本
0.2.13+d2eb645
描述bug
逆地理编码(坐标转地址),第二次进行坐标转地址失败
复现步骤
首次获取用户当前坐标传入坐标转地址可以正确获取到详细地址,当用户坐标发生变化,传入新的坐标后,无法返回详细地址,但控制台有打印地址
期望行为
可以正常返回用户详细地址
截图
_getAddress(double lat, double lng) async{
if(lat > 0 && lng > 0) {
var latLng = LatLng(
lat, lng);
/// 逆地理编码(坐标转地址)
var reGeocodeList = await AmapSearch.searchReGeocode(
latLng,
radius: 200.0,
);
if (reGeocodeList != null) {
var result = await reGeocodeList.formatAddress;
setState(() {
_result = result;
});
print(result);
}
}
}
flutter doctor
功能描述
通过 poi id 获取poi信息.
Native端对应字段/方法
调用 PoiSearch 的 searchPOIIdAsyn(java.lang.String poiID)
功能描述
Can support null safety
Native端对应字段/方法
是否能支持空安全
Future<List> get roads {
return platform(
android: (pool) => _androidModel.getRoads),
ios: (pool) => _iosModel.get_roads(),
);
}
插件版本
遇到bug的平台(Android/iOS)
描述bug
复现步骤
期望行为
截图
flutter doctor
功能描述
关键字搜索功能,
adname | 区域名称 | |
---|---|---|
district | 地级市或县级市 | |
aoi | 所属aoi | |
street | 街道名称 |
插件版本
amap_map_fluttify: ^0.10.1+e42cd2f
amap_search_fluttify: ^0.3.4+97873c8
遇到bug的平台(Android/iOS)
Android
描述bug
我的android主项目中,基础模块已经引入了高德地图的部分库,在Flutter模块中导入作者你的库,编译不通过,程序类型已存在。AGPBI: {"kind":"error","text":"Program type already present: com.amap.api.services.a.a","sources":[{}],"tool":"D8"}
复现步骤
期望行为
截图
flutter doctor
我看到代码里面已经有adCode,但是没有暴露出来
插件版本
amap_search_fluttify: ^0.14.0
遇到bug的平台(Android/iOS)
iOS
描述bug
关键字查询,没有传city字段查询不到数据
复现步骤
期望行为
flutter doctor
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[✓] Connected device (2 available)
• No issues found!
功能描述
Native端对应字段/方法
插件版本
amap_search_fluttify: ^0.3.2+14a38e3
描述bug
ios端搜索无法返回数据 Android端正常
复现步骤
void gotoGaode() async {
//此处 AmapSearch.searchGeocode ios没有返回值 Android端有返回值
final poiList = await AmapSearch.searchGeocode(data.address);
if (poiList.length > 0) {
poiList[0].latLng.then((data) async {
_toLatController = data.latitude;
_toLngController = data.longitude;
print(
'_toLatController $_toLatController _toLngController $_toLngController');
//跳转高德地图
String head;
if (Platform.isIOS) {
head = "iosamap://path?";
} else {
head = "androidamap://route?";
}
String url = head +
"sourceApplication=amap&slat=" +
_fromLatController.toString() +
"&slon=" +
_fromLngController.toString() +
"&dlat=" +
_toLatController.toString() +
"&dlon=" +
_toLngController.toString() +
"&dev=0&t=0";
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
});
}
}
flutter doctor
[✓] Flutter (Channel master, v1.12.1, on Mac OS X 10.15.1 19B88, locale zh-Hans-CN)
• Flutter version 1.12.1 at /Users/puyang/flutter/flutter
• Framework revision 86c91b12d8 (2 weeks ago), 2019-11-11 13:29:46 -0800
• Engine revision 31cd2dfca2
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/puyang/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = /Users/puyang/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (1 available)
• “puy”的 iPad • 00008027-000641083E85002E • ios • iOS 13.2.3
功能描述
搜索基于业务数据的位置信息,如业务附近平台商户,附近用户、骑手等
Native端对应字段/方法
云图搜索
https://lbs.amap.com/api/android-sdk/guide/map-data/cloud-poi
https://lbs.amap.com/api/ios-sdk/guide/map-data/cloud-poi
附近派单功能
https://lbs.amap.com/api/android-sdk/guide/map-data/poi
https://lbs.amap.com/api/ios-sdk/guide/map-tool/nearby
插件版本
amap_search_fluttify: ^0.8.0+b2681d9
遇到bug的平台(Android/iOS)
安卓
描述bug
AmapSearch.dispose方法报错
复现步骤
关闭定位搜索页面以后出现
期望行为
截图
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: Class 'com_amap_api_location_AMapLocationClient' has no instance getter 'tag'.
Receiver: Instance of 'com_amap_api_location_AMapLocationClient'
Tried calling: tag
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 AmapSearch.dispose.<anonymous closure> (package:amap_search_fluttify/src/facade/amap_search.dart:1016:40)
#2 WhereIterator.moveNext (dart:_internal/iterable.dart:442:11)
#3 MappedIterator.moveNext (dart:_internal/iterable.dart:394:19)
#4 new List.from (dart:core-patch/array_patch.dart:47:19)
#5 Iterable.toList (dart:core/iterable.dart:400:5)
#6 Ref_Batch.release_batch (package:foundation_fluttify/src/type/core/ref.dart:88:43)
#7 AmapSearch.dispose (package:amap_search_fluttify/src/facade/amap_search.dart:1017:52)
#8 AmapSearchDisposeMixin.dispose (package:amap_search_fluttify/src/facade/amap_search.dart:14:16)
#9 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4435:12)
#10 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1748:13)
#11 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#12 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5433:14)
#13 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#14 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#15 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4272:14)
#16 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#17 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#18 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5433:14)
#19 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#20 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#21 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5433:14)
#22 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#23 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#24 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4272:14)
#25 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#26 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#27 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5534:16)
#28 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#29 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#30 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4272:14)
#31 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#32 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#33 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5433:14)
#34 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#35 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#36 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4272:14)
#37 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1744:13)
#38 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1746:7)
#39 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5433:14)
#40 _InactiveElements._unmount (packag
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18362.720], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.6)
[√] IntelliJ IDEA Ultimate Edition (version 2019.2)
[√] Connected device (1 available)
插件版本
0.16.2
遇到bug的平台(Android/iOS)
Android
描述bug
searchKeyword searchAround 返回poi的 provinceCode, cityCode, adcode 值为空;
复现步骤
期望行为
截图
flutter doctor
Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19041.746], locale zh-CN)
• Flutter version 1.22.5 at D:\DevEnv\Flutter
• Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
POI 能否加入地区这个字段 area
插件版本
amap_search_fluttify: ^0.2.8+b164d03
描述bug
Exception has occurred. StateError (Bad state: Cannot add event after closing),程序停止运行
复现步骤
频繁搜索,多次快速点击,debug模式下
期望行为
截图
flutter doctor
比如 request.set_types 谢谢🙏,在线等
var inputTips = await AmapSearch.fetchInputTips(newValue);
final List list=[];
for (var value in inputTips) {
sleep(Duration(microseconds: 1000));
var name= await value.name;
var address = await value.address;
var pos = await value.location;
list.add(PositionInfo(address, pos));
}
以上这个代码在 var pos = await value.location; 总是报错,请要怎么办呢?
自己运行前还要改key之类的
Is it possible to set search language? I've found "setLanguage" in plugin implementation, but it is not used anywhere.
插件版本:amap_search_fluttify: ^0.16.2
遇到bug的平台(Android/iOS):android studio
运行不起来,Launching lib/main.dart on EML AL00 in debug mode...
Running Gradle task 'assembleDebug'...
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/android/view/SurfaceHolderHandler.kt: (13, 34): Object is not abstract and does not implement abstract member public abstract fun surfaceCreated(@nonnull p0: SurfaceHolder): Unit defined in android.view.SurfaceHolder.Callback
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/android/view/SurfaceHolderHandler.kt: (16, 17): 'surfaceCreated' overrides nothing
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/android/view/SurfaceHolderHandler.kt: (24, 17): 'surfaceChanged' overrides nothing
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/android/view/SurfaceHolderHandler.kt: (32, 17): 'surfaceDestroyed' overrides nothing
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/platform_view/android_view_SurfaceViewFactory.kt: (21, 33): Object is not abstract and does not implement abstract member public abstract fun surfaceCreated(@nonnull p0: SurfaceHolder): Unit defined in android.view.SurfaceHolder.Callback
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/platform_view/android_view_SurfaceViewFactory.kt: (28, 13): 'surfaceCreated' overrides nothing
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/platform_view/android_view_SurfaceViewFactory.kt: (35, 13): 'surfaceChanged' overrides nothing
e: /Users/wangzijian/.pub-cache/hosted/pub.flutter-io.cn/foundation_fluttify-0.11.1/android/src/main/kotlin/me/yohom/foundation_fluttify/platform_view/android_view_SurfaceViewFactory.kt: (42, 13): 'surfaceDestroyed' overrides nothing
FAILURE: Build failed with an exception.
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.0.1, on macOS 12.0.1 21A559 darwin-arm, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin
code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see
https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
[✓] Chrome - develop for the web
[!] Android Studio (version 2020.3)
✗ Unable to find bundled Java version.
[✓] Connected device (2 available)
! Doctor found issues in 2 categories.
插件版本
0.8.2+1
遇到bug的平台(Android/iOS)
android
描述bug
Launching lib/main.dart on MI 5X in debug mode...
Running Gradle task 'assembleDebug'...
Compiler message:
../../../.pub-cache/hosted/pub.flutter-io.cn/flushbar-1.10.0/lib/flushbar_route.dart:303:8: Error: The method 'FlushbarRoute.install' has fewer positional arguments than those of overridden method 'OverlayRoute.install'.
void install() {
^
../../flutter/packages/flutter/lib/src/widgets/routes.dart:41:8: Context: This is the overridden method ('install').
void install(OverlayEntry insertionPoint) {
^
../../../.pub-cache/hosted/pub.flutter-io.cn/flushbar-1.10.0/lib/flushbar_route.dart:311:18: Error: Too few positional arguments: 1 required, 0 given.
super.install();
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/14cells/Android/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/14cells/Android/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 45s
Finished with error: Gradle task assembleDebug failed with exit code 1
复现步骤
期望行为
截图
flutter doctor
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.14.6 18G103, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (1 available)
插件版本
amap_search_fluttify: ^0.17.0-dev.0
遇到bug的平台(Android/iOS)
Android有问题, iOS是好的。
描述bug
poiList为空
I/flutter (23234): ReGeocode{provinceName: 浙江省, cityName: 杭州市, cityCode: 0571, adCode: 330106, districtName: 西湖区, townCode: 330106109000, township: 三墩镇, neighborhood: , building: , country: **, formatAddress: 浙江省杭州市西湖区三墩镇紫荆花北路龙湖·紫荆天街公寓, roads: [], aoiList: [], poiList: []}
复现步骤
ReGeocode reGeocode =
await AmapSearch.instance.searchReGeocode(move.coordinate);
期望行为
poiList有数据
flutter doctor
➜ ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.61.2)
[✓] Connected device (2 available)
• No issues found!
➜ ~
插件版本
amap_search_fluttify 0.8.2+1
遇到bug的平台(Android/iOS)
Android
描述bug
E/libEGL (27534): eglCreateWindowSurface: native_window_api_connect (win=0x55859973e0) failed (0xffffffed) (already connected to another API?)
E/libEGL (27534): eglCreateWindowSurface:456 error 3003 (EGL_BAD_ALLOC)
W/System.err(27534): com.amap.api.services.core.AMapException: IO 操作异常 - IOException
W/System.err(27534): at com.amap.api.services.a.a.g(BasicHandler.java:169)
W/System.err(27534): at com.amap.api.services.a.a.c(BasicHandler.java:116)
W/System.err(27534): at com.amap.api.services.a.av.getFromLocation(GeocodeSearchCore.java:86)
W/System.err(27534): at com.amap.api.services.a.av$1.run(GeocodeSearchCore.java:144)
W/System.err(27534): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/System.err(27534): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/System.err(27534): at java.lang.Thread.run(Thread.java:818)
D/java-callback(27534): fluttify-java-callback: onRegeocodeSearched(null1902)
I/flutter (27534): fluttify-dart-callback: onRegeocodeSearched(['var2':{var2: 1902, var1: null}[var2]])
I/flutter (27534): onRegeocodeSearched::kNativeObjectPool: {com_amap_api_maps_AMapOptions{refId: 255043341}, com_amap_api_maps_model_LatLng{refId: 116541122}, com_amap_api_maps_model_CameraPosition{refId: 46361811}, com_amap_api_maps_AMap{refId: 38735871}, com_amap_api_maps_UiSettings{refId: 137149226}, com_amap_api_maps_model_MyLocationStyle{refId: 143568155}, com_amap_api_maps_model_CameraPosition{refId: 249897609}, com_amap_api_maps_model_CameraPosition{refId: 118203022}, com_amap_api_maps_model_LatLng{refId: 827346211}, com_amap_api_services_core_LatLonPoint{refId: 158531460}, com_amap_api_services_geocoder_RegeocodeQuery{refId: 65614701}, com_amap_api_services_geocoder_GeocodeSearch{refId: 66230633}, android_location_Location{refId: 108692157}, com_amap_api_maps_model_LatLng{refId: 183782517}, com_amap_api_maps_model_CameraPosition{refId: 68670587}, com_amap_api_maps_model_CameraPosition{refId: 200718038}, com_amap_api_maps_CameraUpdate{refId: 54869335}, com_amap_api_maps_model_CameraPosition{refId: 58681954}, com_amap_ap
I/flutter (27534): fluttify-dart: com.amap.api.services.geocoder.RegeocodeResult@null::getRegeocodeAddress([])
W/System.err(27534): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
W/System.err(27534): at me.yohom.amap_search_fluttify.sub_handler.SubHandler4$1.lambda$new$141(SubHandler4.java:4945)
W/System.err(27534): at me.yohom.amap_search_fluttify.sub_handler.-$$Lambda$SubHandler4$1$5OrY_smv79B4KSZNsfcz66QzllM.call(lambda)
W/System.err(27534): at me.yohom.amap_search_fluttify.AmapSearchFluttifyPlugin.onMethodCall(AmapSearchFluttifyPlugin.java:158)
W/System.err(27534): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
W/System.err(27534): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
W/System.err(27534): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
W/System.err(27534): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(27534): at android.os.MessageQueue.next(MessageQueue.java:323)
W/System.err(27534): at android.os.Looper.loop(Looper.java:141)
W/System.err(27534): at android.app.ActivityThread.main(ActivityThread.java:5603)
W/System.err(27534): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(27534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
W/System.err(27534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)
E/flutter (27534): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, null)
E/flutter (27534): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (27534): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter (27534):
E/flutter (27534): #2 com_amap_api_services_geocoder_RegeocodeResult.getRegeocodeAddress (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/RegeocodeResult.g.dart:104:77)
E/flutter (27534): #3 _AndroidSearchListener.onRegeocodeSearched (package:amap_search_fluttify/src/facade/amap_search.dart:1096:31)
E/flutter (27534): #4 com_amap_api_services_geocoder_GeocodeSearch.setOnGeocodeSearchListener. (package:amap_search_fluttify/src/android/com/amap/api/services/geocoder/GeocodeSearch.g.dart:123:21)
E/flutter (27534): #5 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
E/flutter (27534): #6 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:370:54)
E/flutter (27534): #7 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
E/flutter (27534): #8 _invoke3. (dart:ui/hooks.dart:303:15)
E/flutter (27534): #9 _rootRun (dart:async/zone.dart:1126:13)
E/flutter (27534): #10 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter (27534): #11 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
E/flutter (27534): #12 _invoke3 (dart:ui/hooks.dart:302:10)
E/flutter (27534): #13 _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
复现步骤
逆地址解析后 setState 地图空白, 可能是这里的问题
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
期望行为
截图
flutter doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.6)
[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)
class ReGeocode with _ToFutureString {
...
/// 附近poi
Future<List> get poiList {
return platform(
android: (pool) async {
return (await this.androidModel.getPois())
.map((it) => Poi.android(it))
.toList();
},
ios: (pool) async {
return (await this.iosModel.get_pois())
.map((it) => Poi.ios(it))
.toList();
},
);
}
...
}
功能描述
搜索的时候希望能添加分页功能
Native端对应字段/方法
query.setPageSize(10);// 设置每页最多返回多少条poiitem
query.setPageNum(currentPage);//设置查询页码
插件版本
amap_search_fluttify: ^0.3.4+97873c8
遇到bug的平台(Android/iOS)
Android
描述bug
驾车路径规划 返回的路径不全 画出来的线 断断续续
报错
PlatformException(Attempt to invoke virtual method 'com.amap.api.maps.model.Polyline com.amap.api.maps.AMap.addPolyline(com.amap.api.maps.model.PolylineOptions)' on a null object reference, null, null)
复现步骤
期望行为
希望有空尽快解决
截图
flutter doctor
v1.9.1+hotfix.6
插件版本
0.9.0-dev.3
遇到bug的平台(Android/iOS)
Android
描述bug
复现步骤
期望行为
flutter doctor
Flutter (Channel stable, v1.17.0, on Microsoft Windows [Version 10.0.18363.778], locale zh-CN)
• Flutter version 1.17.0
• Framework revision e6b34c2b5c (7 days ago), 2020-05-02 11:39:18 -0700
• Engine revision 540786dd51
• Dart version 2.8.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.