what is the actual root cause of this issue? I already sync with gradle files but eventually failed.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Just sync your project with gradles. File --> Sync Project with Gradle Files
回答2:
Build -> Clean Project
Build -> Rebuild Project
File -> Sync project with gradle files . If not worked then try
File -> Invalidate Caches / Restart .
It's work for me !!!
回答3:
That could be fixed in one or two steps, depending on how nice is Android Studio today:
- Try to sync your project with gradle files:
- If that doesn't work, invalidate Android Studio caches and restart. That should fix the problem:
The reason behind the first solution not working could be related on gradle cached dependencies problems, but who knows