Pregunta

I was making app, the app was only 10 activities and some buttons with text views nothing to complicated, it was lyrics app (it shows lyrics of music band). i was making buttons and then i made them the id's started to show up red so i wanted to know what happend and R was deleted from gen folder and suddenly all the activities became full of errors. idk what happened i tried regenerating it but no luck i tried many thing but no luck so i dont know that to do.

i deleted gen folder, and build config regenerated but not r. i tried cleaning project but no luck. i tried restoring it from history but there was no history. so idk what to do

¿Fue útil?

Solución 2

It seems like you have error/s in one of the interface .xml files. ADT(Eclipse) does not report those errors. This is where ADT Android project is a bit different from a normal Java project. An android project requires a constantly updated persistent R.java file. Among other things, the R.java file has all the resources IDs provided in the interfaces and maintains interface's consistency.

Have a look at this post, may be a quick fix to your issue.

https://stackoverflow.com/a/22224369/819344

Otros consejos

R file is a generated file. If this file is not generated automatically try to rebuild project, clean project or check your xml files to look if there are some errors in it.

First of all check if there is an error in one of your xml files (layout,drawable, etc...)

Clean the project and rebuild it again. If this thing won't happens delete the android.jar file and right click on project and click fix project setup so that it will be added.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top