Open TianyaHelp opened 2 years ago
change
@TianyaHelp 你的问题解决了吗
单元测试 无法使用 FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformClassesWithSensorsAnalyticsAutoTrackForAirmoreDebugAndroidTest'.
δ����� Android SDK����ο������ĵ���鼯�ɲ����Ƿ���ȷ�� https://manual.sensorsdata.cn/sa/latest/tech_sdk_client_android_basic-32506144.html ����رմ���ʾ������Ӳ������: disableCheckSdk=true
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
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
sensorsdata/sa-sdk-android-plugin2# 貌似目前不支持gradle.properties里配disableCheckSDK
插件 v4.0.0-beta 自持 DSL 集成,请升级插件到 v4.0.0-beta 检查是否还有该问题
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:
Try:
Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.sensorsdata.analytics.android', version: 'android-gradle-plugin2:3.4.6', apply: false] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'com.sensorsdata.analytics.android:com.sensorsdata.analytics.android.gradle.plugin:android-gradle-plugin2:3.4.6') Searched in the following repositories: Gradle Central Plugin Repository Google BintrayJCenter MavenRepo maven(https://repo1.maven.org/maven2/) maven2(https://storage.googleapis.com/r8-releases/raw) at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:221)
修改后的代码 单元测试 也不行
test.zip