I created a new module with a fragment view and a ViewModel. Every time a reference a view or resource attribute through view binding or getString(), it oddly auto imports fake.
package.name.
for.sync.R
. Why is this happening? How to rectify it?
I had the same problem. Could fix it invalidating caches and restarting.
To do so, in Android studio top menu: File-> invalidate caches -> invalidate and restart
hope it helps