### 配置 Maven 地址
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
在 Project 的 build.gradle 文件中配置 maven 地址。
```gradle
maven {
url "https://mirrors.tencent.com/repository/maven/tencent_public/"
}
maven {
url "https://mirrors.tencent.com/repository/maven/tencent_public_snapshots"
}
maven {
url "https://oss.sonatype.org/content/groups/public"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url "https://oss.sonatype.org/content/repositories/staging/"
}
```
--------------------------------
### 配置 Maven 或 Jcenter 仓库
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
在 Project 的 build.gradle 文件中配置 repositories,添加 maven 或 jcenter 仓库地址。
```gradle
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
//向所有模块配置仓库:
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
```
--------------------------------
### 配置 App Module 的 build.gradle
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
在主工程 app module 的 build.gradle 文件配置 dependencies,引入指定版本 SDK。
```gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//最新版本号参考:https://lbs.qq.com/mobile/androidMapSDK/download/3dDownload
implementation 'com.tencent.map:tencent-map-vector-sdk:5.7.0'
}
```
--------------------------------
### 配置 Application 标签
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
在 AndroidManifest.xml 的 application 标签中配置 Key。
```xml
```
--------------------------------
### proguard-rules.pro Obfuscation Configuration
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
Obfuscation scripts to be added to the proguard-rules.pro file if obfuscation is required for the project.
```proguard
-keep public class com.tencent.lbssearch.** {*;}
-keep public class com.tencent.map.** {*;}
-keep public class com.tencent.mapsdk.** {*;}
-keep public class com.tencent.tencentmap.**{ *;}
-keep public class com.tencent.tmsbeacon.**{*;}
-keep public class com.tencent.tmsbeacon.**{*;}
-dontwarn com.qq.**
-dontwarn com.tencent.**
```
--------------------------------
### 生成秘钥
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/getKey
生成Key的步骤说明,包括填写应用信息、勾选SDK配置和WebService API,以及添加生成Key。
```text
1)填写KEY名称、描述、阅读并同意使用条款等应用信息;
2)勾选地图SDK配置,可以设置包名,包名要和APP一致;
3)使用检索功能需要勾选WebService API;
4)点击添加生成KEY;
```
--------------------------------
### AndroidManifest.xml Permissions
Source: https://lbs.qq.com/mobile/androidMapSDK/developerGuide/configuration
Permissions required by the Tencent Maps SDK for network access, storage, and other system functionalities.
```xml
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.