Thursday, 11 September 2014

Copied Android Studio project still refers to old layout files


I recently copied a HelloWorld Android Studio app from one location to another. Changes I made to the layout in the new project were just not being picked up. A Ctrl+B on the resource which was being used to refer to the layout opened up the layout file from the old HelloWorld project.

It turns out that there was a variable RES_FOLDERS_RELATIVE_PATH in the app.iml file which was pointing to file://$MODULE_DIR$/../../HelloWorld/app/src/main/res  (the old res folder) - after closing Android Studio and manually changing this to refer to file://$MODULE_DIR$/src/main/res, and removing the .idea\workspace.xml file and things started working as expected.

No comments:

Post a Comment