我刚刚更新到 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/