如何集成
请参考下方文档来集成 GrowingIO 无埋点或埋点 SDK.
添加代码依赖的仓库地址
集成 GrowingIO SDK 时需要注意是否已经添加 mavenCentral()
仓库地址。
集成无埋点时,需要添加额外的 Gradle 插件,集成插件时需要注意是否已经添加 gradlePluginPortal()
仓库。
- AGP7及以上
- 低版本Gradle
在 project 中的 settings.gradle
文件中添加代码仓库地址。
pluginManagement {
repositories {
// 添加 gradle plugin 依赖的仓库地址
gradlePluginPortal()
//如果使用 SNAPSHOT 版本,则需要使用如下该仓库。
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
// 添加sdk依赖的 maven 仓库地址
mavenCentral()
//如果使用 SNAPSHOT 版本,则需要使用如下该仓库。
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
在 project 中的 build.gradle
文件中添加代码仓库地址。
buildscript {
repositories {
// 添加 gradle plugin 依赖的仓库地址
gradlePluginPortal()
//如果使用 SNAPSHOT 版本,则需要使用如下该仓库。
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
allprojects {
repositories {
// 添加maven仓库
mavenCentral()
//如果使用 SNAPSHOT 版本,则需要使用如下该仓库。
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
集成无埋点SDK
无埋点SDK能够在不修改代码的情况下,自动帮助应用获取页面浏览,页面点击等埋点事件。