I'm using Android Studio 1.2. I make edits to a Java Source file and save them. When I close the file and reopen it the edits are displayed briefly but then the file reverts back to some previous version of local history. The actual source file on disk is correct, the editor just does not display the current version. Any idea why this might happen or what I can do to prevent it?
1 Answer
When examining this more fully I discovered that this happened on code where a string was being loaded from a resource file. Apparently with the Android-Studio IDE there is an option within the editor for Code Folding which shows the actual literal string in the resource file where the line of code is. So
this.getString(R.string.storename); gets replaced with
this.getString("Store Name"); I turned off code folding in the editor settings.