Eclipse - Force Refresh of IDs
I'm using eclipse for Android development, and the editor always seems to take a while to actually upd开发者_如何学Goate and recognize if I change an ID in a layout, then try to use it in a class with R.id.someId. Is there a way to force a refresh?
- You may be running into the delay where automatic building meets unsaved files. Try manually saving the file after the change.
- If you have the generated file, R.java, open in an editor then it may not update.
- Alternately, you can blow everything away with a Project/Clean.
- Alternately, you could manually build.
- Highlighting the project and hitting "F5" may work for you.
Let us know what, if anything, worked for you.
Yes, you can do a Project -> Clean.
精彩评论