gpt4 book ai didi

Android Studio 不会更改字符串

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:26:47 25 4
gpt4 key购买 nike

在我的 strings.xml 文件中我有这个字符串:

<string name="lets_do_this">Let's Do This</string>

这给了我一个错误:

Error:(897) Apostrophe not preceded by \ (in Let's Do This)

所以我把字符串改成这样:

<string name="lets_do_this">Let\'s Do This</string>

但每次我构建项目时,由于某种原因,字符串会不断变回第一个版本,并且我不断收到该错误而无法更改字符串。为什么会这样?

最佳答案

如果变回来,听起来像是您更改了位于 build 文件夹中的字符串 xml 文件,但您需要在 res/values 中编辑您自己的文件应用程序模块。

关于Android Studio 不会更改字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41224367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com