【问题标题】:Gradle Error: Build failed with an exception, a problem occured while configuring project ':Demo'Gradle 错误:构建失败并出现异常,配置项目 \':Demo\' 时出现问题
【发布时间】:2022-12-25 00:50:27
【问题描述】:

将项目添加为模块时

什么地方出了错:来不及修改 excludes 已经阅读配置项目。

考虑将此调用移动到评估期间,正在使用变体 API。

遵循的步骤:文件 -> 导入模块 -> 选择项目文件

Gradle Failed Exception

【问题讨论】:

  • 请先尝试 Invalidate Cache Restart,clean。
  • 我遇到了同样的问题。首先,我按照建议将 androidx.appcompat:appcompat 更新为 1.5.1。导致的错误。说更新gradle。所以我更新到 7.3.1 并得到上面的错误。如果我不从 1.41 升级 androidx.appcompat:appcompat,我会收到上面的错误。当我更新 gradle 时。我什至不知道他们在说什么“排除”!
  • 那对我不起作用。得到了同样的错误。这是什么意思?什么是变体 API?他们在说什么电话?那个错误信息是谁写的?

标签: android gradle


【解决方案1】:

我的项目使用gRPC 并且我将Android Target SDK 版本从30 更改为31 并发生此异常。 将 Protobuf Plugin for Gradle 的版本从 0.8.13 更新为 0.9.1 解决了该错误。

dependencies {
    classpath "com.google.protobuf:protobuf-gradle-plugin:$versions.protobuf.plugin"
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-16
    • 2015-10-01
    • 1970-01-01
    • 2020-05-09
    • 2014-04-08
    • 2020-09-06
    • 1970-01-01
    • 2018-10-29
    相关资源
    最近更新 更多