Android Studio-wont remember new edits and automatically reverts to old versions of files sometimes

后端 未结 6 1027
臣服心动
臣服心动 2021-01-17 14:37

Every once and a while I have an issue with the new Android Studio. Sometimes while editing, if I make a mistake in one of my files, then try to build it, Android studio wi

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 15:27

    I've had a similar issue when I make a mistake in my strings.xml file, for example when I have an apostrophe without preceding with a '\'. The trouble is that when the build fails, Android Studio automatically opens app\build\intermediates\res\merged\debug\values\values.xml to show me the broken string. If I then try to correct the string in that file, it doesn't do any good because when I try to rebuild, strings.xml is still broken. The crucial thing is to make sure that you're making the correction in strings.xml rather than the values.xml file.

提交回复
热议问题