I recently got this warning in Layout
and manifest files.
I have attached those images below just check those in case for further clarification.
The pro
To "Sync Project with Gradle files" you don't have to change anything on your file. If you're on a Mac you just cmd + fn + F9 or cmd + shift + a (search action and type what's between double quotes). There's also a beautiful icon for that on Android Studio.
100% Working
Do this two steps:
C:\Users\User_folder\.AndroidStudio3.6\system\caches
.C:\Users\User_folder\AndroidStudioProjects\Project_name\.idea\caches
.It is very simple. Delete .caches file:
C:\Users\user\.AndroidStudio3.2\system
)Ran into the same issue. I think that there's some specific bug related to this for Android Studio 3.2. My solution on Windows was to delete everything withing the cache/ folder in the .AndroidStudio3.2/ folder.
I tried everything that other's mentioned, sync gradle files, invalidate cache, removed the whole project and added it again. The only thing that worked for me was reinstalling the Android Studio. The second time that happened to me I decided to look for a better solution than reinstalling the whole Android Studio. Started playing with the cache files and figured out that deleting everything under the cache/ folder in the configuration folder of the Android Studio solved the problem.
This is problem with Android studio caches.
most probably syncing the project with gradle files will help
If no, you can manually delete cached files located on $HOME/.AndroidStudio3.2/system/caches and rebuild your project.
UPDATE: Gradle sync cache isses fixed in android studio 3.5 version. Update android studio to latest version can help.