小编GOV*_*XIT的帖子

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

我刚刚更新到 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.
Run Code Online (Sandbox Code Playgroud)

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

摇篮版本:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-milestone-1-all.zip
Run Code Online (Sandbox Code Playgroud)

Gradle插件工具版本:

classpath 'com.android.tools.build:gradle:4.1.0-alpha10'
Run Code Online (Sandbox Code Playgroud)

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

android gradle android-studio android-gradle-plugin android-studio-4.0

7
推荐指数
1
解决办法
1624
查看次数