This happens for both Dagger generated files and for LiveData generated binding files.
I'll change branches and the generated file for the new Live Data layout or the generated MemberInjector for a new daggeer component will stick around even though those new components are actually on the other branch.
I'll do a Invalidate caches and restart as well as a clean build. But it doesn't work. I even tried manually deleting the files and they just got regenerated.
The only way I've found to fix it is to uninstall android studio and reinstall it.
My co-worker who uses a mac does not experience this problem.