当前位置:网站首页>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
边栏推荐
- Moher College webmin unauthenticated remote code execution
- 墨者学院-phpMyAdmin后台文件包含分析溯源
- Oracle-存储过程与函数
- Activiti常見操作數據錶關系
- PHP session variable passed from form - PHP
- 力扣今日题-1200. 最小绝对差
- PCIe knowledge points -010: where to get PCIe hot plug data
- Question 49: how to quickly determine the impact of IO latency on MySQL performance
- Use preg_ Match extracts the string into the array between: & | people PHP
- 弈柯莱生物冲刺科创板:年营收3.3亿 弘晖基金与淡马锡是股东
猜你喜欢
Collections in Scala
[go basics] 1 - go go
PCIE知识点-010:PCIE 热插拔资料从哪获取
Project 1 household accounting software (goal + demand description + code explanation + basic fund and revenue and expenditure details record + realization of keyboard access)
一文了解数据异常值检测方法
Unity text superscript square representation +text judge whether the text is empty
DM database password policy and login restriction settings
Take you to master the formatter of visual studio code
Redis 哨兵机制
墨者学院-phpMyAdmin后台文件包含分析溯源
随机推荐
Learn nuxt js
C#实现一个万物皆可排序的队列
Sqli labs download, installation and reset of SQL injection test tool one of the solutions to the database error (# 0{main}throw in d:\software\phpstudy_pro\www\sqli labs-...)
NewH3C——ACL
[go basics] 1 - go go
DM8 command line installation and database creation
OKR vs. KPI 一次搞清楚这两大概念!
R language uses cforest function in Party package to build random forest based on conditional inference trees, uses varimp function to check feature importance, and uses table function to calculate co
[gurobi] establishment of simple model
Collections in Scala
Snipaste convenient screenshot software, which can be copied on the screen
How to write a summary of the work to promote the implementation of OKR?
Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14
根据数字显示中文汉字
Difference between static method and non static method (advantages / disadvantages)
2022 gas examination registration and free gas examination questions
@Role of requestparam annotation
ZABBIX monitoring system custom monitoring content
学习Nuxt.js
OKR vs. KPI figure out these two concepts at once!