Android Gradle Sync 同步项目失败

标签 android android-studio android-gradle-plugin build.gradle

Android Gradle Sync 无法同步项目:

Unable to find method 'org.gradle.api.internal.project.ProjectInternal.getPluginManager()Lorg/gradle/api/internal/plugins/PluginManagerInternal;

enter image description here

最佳答案

我认为这是gradle缓存的问题。我认为你需要清除它。 SO 的最佳解决方案是

"You can safely delete the whole .gradle folder located under project directory. It'll be recreated every time the tasks are run. The same is for .gradle under home directory. It'll also be recreated as well, but the whole dependencies must be downloaded again - it's quite time-consuming.

As I see in various places over the web gradle for android development is quite slow and people complain about it. No idea what's reason exactly - this is how it works.

I don't think that low performance is because of big folders. Actually they help it to be faster.

there might gradle.properties as well as global gradle scripts located under $HOME/.gradle. In such case special attention must be paid when deleting the content of this directory."

看看this关联 。 如果有帮助请选择它作为答案并告诉我。

关于Android Gradle Sync 同步项目失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40926976/

相关文章:

java - 如何将纬度和经度拆分为单独的字符串?

android - 使用 Android AccountManager Twitter 凭据创建 Twitter4J AccessToken

intellij-idea - 将另一个 gradle 项目导入现有的 android 项目时,Android Studio 访问被拒绝

kotlin - 迁移到非实验性协程

android - Android Studio中的堆大小问题

java - 如何修复 "More than one file was found with OS independent path ' project.properties'"Android Studio 3.0 Beta-6 中的错误

java - 谷歌云消息和 MySQL 数据库

android - 预期 org.gradle.api.artifacts.result.ResolvedDependencyResult 但找到 org.gradle.api.internal.artifacts.result.DefaultUnresolvedDependencyResult

android - Android Studio 中缺少 aidl

android - 指定的子项已有父项。填充表格行时,您必须对 child 的 parent 调用 removeChild()