Reputation: 129
I am working on android project, all was working well, until suddenly I opened Android Studio and found warnings all my layout files. E.g unknown attribute android:layout_width, unknown attribute android:id etc. I tried creating a new layout resource file and it also did the same, only options available now are constraint_width,height and so on. What could be my problem here?
Upvotes: 1
Views: 517
Reputation: 378
Sometimes File -> Invalidate Caches/Restart. doesn't work, so do the manual clearing of the cache
1. Closed Android Studio.
2. Clear the contents of the C:\Users\MyUsername.AndroidStudio3.3\system\caches\ directory.
3. Relaunched Android Studio.
Upvotes: 0
Reputation: 129
None of the suggested solutions worked, I had to remove all my configuration settings, gradle files and uninstall AS, redownloading it was the only solution.
Upvotes: 0
Reputation: 169
I had similar issue but resolved by invalidating caches and restarting android studio: Go to Android Studio: File -> Invalide Caches/Restart.
Upvotes: 0
Reputation: 1655
In your android studio try steps below:
File -> close project
From the list click on the "X" button in front of your project to remove it from the recent projects (As marked in image).
Click "open an existing Android Studio project", browse and select your project and reopen it.
By step 3 problem should be solved, if it wasn't, click Build -> Rebuild project.
Upvotes: 0
Reputation: 1145
Just on menu bar invalide caches and restart Android-Studio: File -> Invalide Caches/Restart
That should help
Upvotes: 1