sensorsdata / sa-sdk-android

神策数据官方 Android 埋点 SDK,是一款轻量级用于 Android 端的数据采集埋点 SDK,包含代码埋点、全埋点、点击图和可视化全埋点功能。全埋点通过配合神策官方 Android 埋点插件来实现,神策数据官方 Android 埋点插件使用字节码插桩(ASM)的技术实现 Android 端的全埋点(无埋点、无码埋点、无痕埋点、自动埋点)。
http://opensource.sensorsdata.cn
Other
1.31k stars 434 forks source link

com.android.tools.build:gradle:7.2.1 插件 导入问题 #103

Open TianyaHelp opened 2 years ago

TianyaHelp commented 2 years ago

pluginManagement { repositories { gradlePluginPortal() google() jcenter() mavenCentral() maven { url 'https://repo1.maven.org/maven2/' } maven { url 'https://storage.googleapis.com/r8-releases/raw' } }

} dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() jcenter() mavenCentral() maven { url 'https://repo1.maven.org/maven2/' } maven { url 'https://storage.googleapis.com/r8-releases/raw' } }

}

plugins { id 'com.android.application' version '7.2.1' apply false id 'com.android.library' version '7.2.1' apply false //添加神策分析 android-gradle-plugin2 依赖 id 'com.sensorsdata.analytics.android' version 'android-gradle-plugin2:3.4.6' apply false

}

### 报以下错误

Build file 'D:\AAA\TESTCODE\test\build.gradle' line: 6

Plugin [id: 'com.sensorsdata.analytics.android', version: 'android-gradle-plugin2:3.4.6', apply: false] was not found in any of the following sources:

修改后的代码 单元测试 也不行
test.zip

TianyaHelp commented 2 years ago

change

dengshiwei commented 2 years ago

@TianyaHelp 你的问题解决了吗

TianyaHelp commented 2 years ago

单元测试 无法使用 FAILURE: Build failed with an exception.

BUILD FAILED in 1m 14s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings 206 actionable tasks: 30 executed, 176 up-to-date

TianyaHelp commented 2 years ago

demo

igilbert commented 1 year ago

sensorsdata/sa-sdk-android-plugin2# 貌似目前不支持gradle.properties里配disableCheckSDK

liuweiqiang2016 commented 1 year ago

插件 v4.0.0-beta 自持 DSL 集成,请升级插件到 v4.0.0-beta 检查是否还有该问题