当前位置:网站首页>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
compileOnly
It 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
application
Import the following... Under the node service
ps: Be careful , If you don't putcompileOnly
It 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
边栏推荐
- Show server status on Web page (on or off) - PHP
- PCIE知识点-010:PCIE 热插拔资料从哪获取
- [untitled] 2022 polymerization process analysis and polymerization process simulation examination
- Activiti常见操作数据表关系
- 一文了解數據异常值檢測方法
- es6总结
- DM database password policy and login restriction settings
- Three paradigms of database design
- Div hidden in IE 67 shows blank problem IE 8 is normal
- 一文了解数据异常值检测方法
猜你喜欢
Preliminary study on temporal database incluxdb 2.2
Unity-Text上标平方表示形式+text判断文本是否为空
SSRF vulnerability exploitation - attack redis
墨者学院-PHPMailer远程命令执行漏洞溯源
1. Getting started with QT
Chrome is set to pure black
Heap concept in JVM
Do you know about autorl in intensive learning? A summary of articles written by more than ten scholars including Oxford University and Google
NPM run build error
Email alarm configuration of ZABBIX monitoring system
随机推荐
Devops Practice Guide - reading notes (long text alarm)
How to use MOS tube to realize the anti reverse connection circuit of power supply
Sort by item from the list within the list - C #
Need help resetting PHP counters - PHP
Moher College webmin unauthenticated remote code execution
Activiti常見操作數據錶關系
Div hidden in IE 67 shows blank problem IE 8 is normal
Set and modify the page address bar icon favicon ico
Introduction to neural network (Part 2)
NewH3C——ACL
Ecole bio rushes to the scientific innovation board: the annual revenue is 330million. Honghui fund and Temasek are shareholders
Do you know about autorl in intensive learning? A summary of articles written by more than ten scholars including Oxford University and Google
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
zabbix監控系統自定義監控內容
一文了解数据异常值检测方法
Moher College phpmailer remote command execution vulnerability tracing
团体程序设计天梯赛-练习集 L1-006 连续因子
C#实现一个万物皆可排序的队列
Activiti common operation data table relationship
If the array values match each other, shuffle again - PHP