matdev
matdev

Reputation: 4283

Gradle build completed successfully but Android Studio cannot resolve dependencies

I've a weird case where gradle builds OK, but Android Studio's editor cannot resolve dependencies. External classes references appear in red and I cannot CTRL+click on these classes to see the source.

Any idea how to solve this ?

I'm using Android Studio 3.1 and gradle 4.4

Upvotes: 1

Views: 782

Answers (1)

matdev
matdev

Reputation: 4283

For those interested, I solved the problem as follows:

  • removed the files in the project 's .idea\libraries
  • menu File -> Invalidate Caches / Restart...
  • menu Build -> Rebuild Project

Upvotes: 3

Related Questions