After updating to Android Studio 3.1 I got this error message:
The project works fine and this is mostly just a warning, so my question is what\'s the meani
I restarted Android Studio and the problem disappeared.
Click File -> Invalidate Caches/Restart
Every time I change the gradle file, I must restart Android Studio to or the problem returns.
You can also try this:
Re-ordered repositories to:
mavenCentral()
maven { url 'https://jitpack.io' }
google()
jcenter()
Clearing this folder: user's ~/.gradle/caches and deleting app build folder manually, then clean and rebuild.