小编Ale*_*ndr的帖子

将 AGP 从 4.1.3 更新到 4.2.2 后 - 出现错误“任务 ':app:lintVitalProductionRelease' 执行失败”

除了AGP更新之外,还将compileSdkVersion和targetSdkVersion更新为30。

\n

构建成功(如果设置)

\n
lintOptions {\n    checkReleaseBuilds false\n}\n
Run Code Online (Sandbox Code Playgroud)\n

否则我得到

\n
Execution failed for task \xe2\x80\x98:app:lintVitalProductionRelease\xe2\x80\x99.\n> Could not resolve all dependencies for configuration \xe2\x80\x98:app:debugUnitTestRuntimeClasspath\xe2\x80\x99.\n   > A problem occurred configuring project \xe2\x80\x98:core-testing\xe2\x80\x99.\n      > java.lang.IllegalStateException: Accessing GradleBuildProject.Builder through AnalyticsConfiguratorService is not allowed after AnalyticsService is created.\n
Run Code Online (Sandbox Code Playgroud)\n

compileSdkVersion 30\nbuildToolsVersion '30.0.3'\nminSdkVersion 21\ntargetSdkVersion 30\ngradle 7.0.2

\n

伙计们,有什么想法吗?

\n

android lint android-lint android-gradle-plugin

9
推荐指数
1
解决办法
1992
查看次数