skip to Main Content

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 :

enter image description here

It is referencing the same view. And because of this none of my changes in the XML file are reflecting on my code.

3

Answers


  1. 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.

    Login or Signup to reply.
  2. Try Invalidate caches/restart, and also try clean project and rebuild project.

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search