I faced a problem with unresolved references in automatically generated files after refactoring/tidying up my project.
What I do:
- Create new package
project/model
- Move existing
Account
fromproject/accoutDatabase
toproject/model
- Rebuild Project
- Receive Error in generated files:
Unresolved Reference : Account
These unresolved references are all located in the java.generated
folder and annotated with "Files under the 'build' folder are generated and should not be edited. The changes will be lost when sources are generated." Thus, manually replacing the reference is useless as the files will be newly generated when rebuilding the project.
Screenshot: Folder structure & Error
I tried the steps suggested in the following link, but they didn't help. Android Studio unresolved reference. Project compiles
Does anyone of you know how to resolve this issue and what causes the problem?
Best regards