Reputation: 663
In my Android Application I'm noticing that when I make changes to XML files in the project my activities and fragment classes do not know that the XML file has been changed and I have to rebuild for the changes to take effect. Is there a way to fix this? And if Anyone could give me a good explanation as to why exactly you need to rebuild it would be greatly be appreciated.
Upvotes: 0
Views: 265
Reputation: 178
Your generated classes are based on what is in your XML. Therefore, whenever you make changes to your XML, you need to rebuild so that your R, BuildConfig, and Manifest classes are regenerated with the new information.
If you are using Eclipse, you could try and enable the option Build Automatically under the Project menu in an attempt to alleviate you having to do it manually. I have never done this, personally, as I tend to want to choose when I rebuild.
Upvotes: 3
Reputation: 38098
In Eclipse, check Build automatically in your project menu item
Upvotes: 2