Android Studio 3.0 Canary 4不支持NativeArtifact.getRuntimeFiles()方法。

6

我的项目在Android Studio 2.3下运行良好。但是在3.0版本下,它无法刷新,并出现以下错误:

Error:Unsupported method: NativeArtifact.getRuntimeFiles().
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 2.14.1和Gradle Android插件2.2.0。升级Gradle(到3.5)并没有解决这个问题。

还有其他人遇到过这个问题并能够找到任何解决方法吗?

2个回答

9

我曾遇到同样的错误信息使用“com.android.tools.build:gradle:3.3.0”。

我找到了两种解决此错误的方法:

  • 更新Android Studio到3.3版本(帮助->检查更新...)
  • 或在build.gradle中切换到“com.android.tools.build:gradle:3.2.1”。

6
尝试在 build.gradle 中进行更改。
 dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接