错误:(218) 撇号前没有 \ [英] Error:(218) Apostrophe not preceded by \

查看:20
本文介绍了错误:(218) 撇号前没有 \的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 strings.xml 中,我创建了一个包含 (it's) 的字符串,但出现此错误.

In my strings.xml, I have made a string containing (it's) and I get this error.

错误:(218) 撇号前没有 \

Error:(218) Apostrophe not preceded by \

是的,我知道我必须在撇号前放置一个 \,或者只是删除撇号,但我的问题是当我使用 (it\s) 或只是删除它运行应用程序时,它又回来了;即使我删除了整个字符串,当我单击运行时,它也会全部恢复.我该如何阻止?

Yes, I know I have to either place a \ before the apostrophe, or just delete the apostrophe, but my problem is that when I run the app using (it\s) or just deleting it, it comes back; even if I delete the whole string, it all comes back when I click run. How do I stop this?

这是字符串,但这真的无关紧要.我只是希望它在我运行应用程序时被删除而不是恢复.

Here's the String but it really doesn't matter. I just want it to be deleted and not restored when I run the app.

<string> name="talk" So, you want these things? LOL its gonna</string>

推荐答案

发生错误时,Android Studio 会打开 values.xml,在文件中的那个点,它看起来与您的 strings.xml 完全一样.确保您正在更新 strings.xml 并且您应该很高兴.

When the error occurs, Android Studio opens the values.xml which, at that point in the file, deceptively looks exactly the same as your strings.xml. Make sure you're updating the strings.xml and you should be good to go.

这篇关于错误:(218) 撇号前没有 \的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆