Unexpected metadata type found in active-android

For a unknown reason Android Studio Fail to build my Project . First time it show me

  Error:Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
  Could not load module metadata from C:\Users\nirzo\.gradle\caches\modules-2\metadata-2.36\descriptors\com.michaelpardo\activeandroid\3.1.0-SNAPSHOT\c5bb972da5c05fbf59bb87e44d69a746\descriptor.bin

  Unexpected metadata type found.

When I clean the Project for second time it show me the below error again . I also try Invalidated Caches

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.michaelpardo:activeandroid:3.1.0-SNAPSHOT.
  Required by:
  project :app

> Could not resolve com.michaelpardo:activeandroid:3.1.0-SNAPSHOT.
> Could not load module metadata from C:\Users\nirzo\.gradle\caches\modules-2\metadata-2.36\descriptors\com.michaelpardo\activeandroid\3.1.0-SNAPSHOT\c5bb972da5c05fbf59bb87e44d69a746\descriptor.bin

But the Project is perfectly running on my other PC

I really don't understand the problem and the reason of it .

Upvotes: 6

Views: 7661

Answers (2)

joseph
joseph

Reputation: 180

You don't have to uninstall android studio. the issue ussually happens because you gradles cannot load data in the metadata folder or you have multiple data folder in the gradle file.

  1. go to "C:\Users\pc.gradle\caches\modules-2"
  2. delete any metadata folder availabe.
  3. return to android studio and rebuild your project ensuring that you have internet connections
  4. wait for the gradle to download some files and sync then
  5. everything should wwork well after doing that

Upvotes: 13

Jude Okoroafor
Jude Okoroafor

Reputation: 484

delete the .gradle file. Connect to the internet. Sync gradle.. Thats it.

I fixed that error by deleting the gradle file completely located inside the

local disk: C:\Users\user\.gradle

Upvotes: 2

Related Questions