-1

I am new to Android development. I am currently using Android Development Studio for my development process. When I create a new project with one activity everything runs fine however, when I add a new activity to the project through the wizard, the r file is deleted and R is not able to be resolved. I haven't an idea why this occurs and can not get Android Studio to regenerate the R file. Has anyone else come across this and know how to fix this?

Thank you!

2 Answers2

1

I had this problem also because I named a folder wrong. You must also care about that every file gets in the right folder. I hope this helps.

weissja19
  • 535
  • 4
  • 11
0

Whenever R is not being resolved, this is usually caused by: (1) your project not building automatically, or (2) a misconfiguration in your /res folder.

The second is usually in the AndroidManifest, layouts, values or anything similar. You may want to check if you see any project errors.

Look at the top two answers here: R cannot be resolved - Android error

Community
  • 1
  • 1
Etienne Bruines
  • 2,848
  • 3
  • 17
  • 25