I am facing a weird issue. I am setting ids to XML views. When I try to reference the id in my activity or fragment I am getting a double reference to it. Please find the screenshot :
It is referencing the same view. And because of this none of my changes in the XML file are reflecting on my code.
Android Studio makes a lot of files as caches and does not delete them. This can cause trouble when there is a need to make new files, so try clean project Invalidate cache and Restart Project in Android Studio.
1st
close android studio, Delete your project .idea and .gradle files and again reload android studio.
OR
2nd
Delete catches of android studio from C: folder
3
Answers
Android Studio makes a lot of files as caches and does not delete them. This can cause trouble when there is a need to make new files, so try clean project Invalidate cache and Restart Project in Android Studio.
Try Invalidate caches/restart, and also try clean project and rebuild project.
1st
close android studio, Delete your project .idea and .gradle files and again reload android studio.
OR
2nd
Delete catches of android studio from C: folder