简体   繁体   English

Android Studio-Gradle同步失败-ToolingRegistryProvider

[英]Android Studio - Gradle Sync Failed - ToolingRegistryProvider

Hi looking for some help as I am not having much luck trying to develop in AndroidStudio. 嗨,我正在寻找一些帮助,因为我没有太多尝试在AndroidStudio中进行开发的运气。 A couple of months ago I had android studio running and I updated it. 几个月前,我运行了android studio,并对其进行了更新。 Ever since I have been getting the follow error when ever I build any project. 自从我在构建任何项目时遇到跟踪错误。

Gradle sync failed: Cause: com.android.build.gradle.internal.ToolingRegistryProvider.

When I clean the project I see the following message. 当我清理项目时,我看到以下消息。

Error:(1, 1) A problem occurred evaluating project ':app'.
> java.lang.NoClassDefFoundError: com/android/build/gradle/internal/ToolingRegistryProvider

I have tried the following to resolve the issue. 我尝试了以下解决方法。

  1. Uninstall and try again. 卸载并重试。
  2. Unistall and manually remove left behind files. 取消安装并手动删除留下的文件。
  3. Download latest gradle version and manually use those files when building. 下载最新的gradle版本,并在构建时手动使用这些文件。

If anyone could point me in hte right direct I would be very grateful is this is driving me up the wall. 如果有人能指出我正确的方向,我将不胜感激,这正使我无所适从。

Thanks. 谢谢。

根据此SO 帖子,您必须像这样删除Gradle模块缓存:

rm -r ~/.gradle/caches/modules-2

I followed the instructions here while uninstalling and reinstalling Android studio and my problem was resolved. 在卸载和重新安装Android Studio时,我按照此处的说明进行操作,问题已解决。

How to completely uninstall Android Studio from windows(v10)? 如何从Windows(v10)完全卸载Android Studio?

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM