当前位置:网站首页>Flutter integrated amap_ flutter_ location
Flutter integrated amap_ flutter_ location
2022-07-04 08:24:00 【Gao Fengsen】
Flutter Integrate amap_flutter_location
Use today amap_flutter_location Wrote a demo, Keep reporting in the process :INVALID_USER_SCODE,error_cod: 1008, Now let's show you the main process
One 、 Registered account
- Register a developer account on Gaode open platform
- Create an , obtain app key
Two 、 To configure
- Import amap_flutter_location
- gradle build After success , take amap_flutter_location -> build.gradle -> android -> dependencies Under the node , Introduction of plug-ins
compileOnlyIt is amended as followsapi
for example :
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 16
}
lintOptions {
disable 'InvalidPackage'
}
dependencies {
//compileOnly 'com.amap.api:location:5.6.0'
api 'com.amap.api:location:5.6.0'
}
}
- Configure relevant permissions under the manifest file , And request the necessary permissions at run time , Please refer to : Gaud open platform
<!-- I configured it myself , Pro feasible measurement -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
- In the list file
applicationImport the following... Under the node service
ps: Be careful , If you don't putcompileOnlyIt is amended as followsapi, There will be a mistake here
<service android:name="com.amap.api.location.APSService" />
3、 ... and 、 Use
If used, refer to file That's enough , Mainly pay attention to whether the configuration information is correct . Here are a few pits
- Generate app key When you need a certificate SHA1 value , Here I use the command line generated keystore I can't live or die , Finally through Android Studio Generated is ok ( Doubt is the problem of alias )
- Report errors :INVALID_USER_SCODE, This error is mainly a configuration problem . First check SHA1 Is the value right ; After making sure there are no problems , Check whether there is any problem with the configured package name ; If not , See if you have configuration service; Finally, not yet , Just look at it. Official reply
边栏推荐
- Leetcode 146. LRU cache
- [untitled] 2022 polymerization process analysis and polymerization process simulation examination
- What determines vacuum permittivity and vacuum permeability? Why do these two physical quantities exist?
- Redis sentinel mechanism
- [performance test] read JMeter
- How to use MOS tube to realize the anti reverse connection circuit of power supply
- 谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
- Easy to understand: understand the time series database incluxdb
- Const string inside function - C #
- Take you to master the formatter of visual studio code
猜你喜欢

NewH3C——ACL

Common components of flask

Devops Practice Guide - reading notes (long text alarm)

DM8 tablespace backup and recovery

Display Chinese characters according to numbers

Wechat has new functions, and the test is started again

Flask 常用组件

FOC控制

A method for detecting outliers of data

PCIe knowledge points -010: where to get PCIe hot plug data
随机推荐
A single element in an ordered array
[Gurobi] 简单模型的建立
[go basics] 1 - go go
论文学习——基于极值点特征的时间序列相似性查询方法
ZABBIX monitoring system deployment
zabbix监控系统自定义监控内容
21 examples of strategic goals to promote the rapid development of your company
如何用MOS管来实现电源防反接电路
C#实现一个万物皆可排序的队列
es6总结
Unity write word
If the array values match each other, shuffle again - PHP
Leetcode 23. 合并K个升序链表
2022 tower crane driver examination and tower crane driver examination questions and analysis
Activiti常見操作數據錶關系
1. Qt入门
PHP session variable passed from form - PHP
Leetcode 146. LRU 缓存
Using the rate package for data mining
ctfshow web255 web 256 web257