Pregunta

I have been trying to create a folder manually to keep all the styling xml files inside my android project using eclipse in windows 7. As soon as I create a xml file inside that new folder and save the xml file. My R.java goes missing. I understand that R.java is not taking in the manual changes to the project. I believe there is a way we can make changes to the project by manually adding folders and reflecting the changes to the R.java file accordingly.

So can anyone please help me out as to what do I have to do to allow manual changes in my project as described above?

¿Fue útil?

Solución

the only way you can create a styles xml file, is inside a values folder, so you can't assemble all the styles files inside one folder, android will not recognize it, thus, not allowing what you are trying to do

here is a link to follow when creating a folder,

http://developer.android.com/guide/topics/resources/providing-resources.html

check this part within Table 1. Resource directories supported inside project res/ directory.

Otros consejos

Styling XML files should go someone in your RES folder, typically some flavor of "values" (like just "values" or "values-hdpi", etc.)

Putting them somewhere else can cause errors, usually they just can't be used but also could cause Eclipse to not be able to build the R.java file correctly.

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