【发布时间】:2018-06-28 18:36:22
【问题描述】:
我最近打开了一个旧项目,将 Android Studio 更新到 3.1.3,但现在无法运行该项目。这是我收到的消息:
Unable to find method 'com.google.common.collect.ImmutableSet.toImmutableSet()Ljava/util/stream/Collector;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
此消息在第二次尝试时被此消息跟进:
Could not initialize class com.android.build.gradle.internal.ide.ModelBuilder
gradle 项目同步一直失败,我已经尝试了以下所有这些解决方案,包括使缓存失效/重新启动缓存、删除 .gradle 文件等。
我不是 Android 专家,所以如果有人能引导我朝着正确的方向前进,我将不胜感激!
【问题讨论】:
-
你最终弄明白了吗?我现在正在努力解决同样的问题。
标签: android build.gradle android-studio-3.0