当前位置:网站首页>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
边栏推荐
- 21 examples of strategic goals to promote the rapid development of your company
- Group programming ladder race - exercise set l2-002 linked list de duplication
- [go basics] 2 - go basic sentences
- 真空介电常数和真空磁导率究竟是由什么决定的?为何会存在这两个物理量?
- FOC控制
- ZABBIX 5.0 monitoring client
- 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
- Unity-Text上标平方表示形式+text判断文本是否为空
- DM8 command line installation and database creation
- Moher College webmin unauthenticated remote code execution
猜你喜欢

NewH3C——ACL

DM8 uses different databases to archive and recover after multiple failures

1. Getting started with QT

ES6 summary

PCIe knowledge points -010: where to get PCIe hot plug data

DM8 command line installation and database creation

Unity-Text上标平方表示形式+text判断文本是否为空

JVM中堆概念

Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service

如何用MOS管来实现电源防反接电路
随机推荐
NPM run build error
[go basics] 2 - go basic sentences
如何用MOS管来实现电源防反接电路
Laravel page load problem connection reset - PHP
DM8 database recovery based on point in time
zabbix监控系统自定义监控内容
1. Getting started with QT
L1-028 judging prime number (10 points)
猜数字游戏
根据数字显示中文汉字
Leetcode (215) -- the kth largest element in the array
Need help resetting PHP counters - PHP
SQL注入测试工具之Sqli-labs下载安装重置数据库报错解决办法之一(#0{main}thrown in D:\Software\phpstudy_pro\WWW\sqli-labs-……)
小程序容器技术与物联网 IoT 可以碰撞出什么样的火花
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-...)
没有Kubernetes怎么玩Dapr?
How to get bytes containing null terminators from a string- c#
OpenFeign 服务接口调用
Set and modify the page address bar icon favicon ico
DM8 tablespace backup and recovery