android - 不支持的方法 : AndroidArtifact. getBuildConfigFields()

标签 android android-studio gradle android-gradle-plugin android-studio-4.0

我刚刚更新到 Android Studio 4.0 并尝试构建我的项目。我不断收到以下错误

Unsupported method: AndroidArtifact.getBuildConfigFields().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

我已经在使用最新版本的 Gradle 和 Gradle Plugin

Gradle 版本:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-milestone-1-all.zip

Gradle 插件工具版本:
classpath 'com.android.tools.build:gradle:4.1.0-alpha10'

此问题的任何解决方案或修复程序都会有所帮助。提前致谢。

最佳答案

使用 Android studio 4.1 预览
或者
类路径'com.android.tools.build:gradle:4.0.0'

关于android - 不支持的方法 : AndroidArtifact. getBuildConfigFields(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62233809/

相关文章:

java - 如果从 BlockingQueue 中拉取的工作线程在 android 中永远不存在,可以吗?

android - Java 到安卓?

android - Gradle 离线如何缓存依赖项

Android AVD 不适用于硬件加速

android - 在 Android Studio 中更改布局后需要清理项目

android - Android Studio 添加Google Play 导致编译失败

gradle - Gradle无法找到项目(找不到路径为$的项目)

javascript - 使用分块传输通过 HTTP POST 流式传输麦克风输出

java - Android 合并调试资源失败

gradle - Gradle如何制作配置变量