简体   繁体   中英

Android Studio - Gradle Sync Failed - ToolingRegistryProvider

Hi looking for some help as I am not having much luck trying to develop in AndroidStudio. A couple of months ago I had android studio running and I updated it. 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.

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.

How to completely uninstall Android Studio from windows(v10)?

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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