Android - strings.xml无法逃脱单引号

时间:2017-01-18 18:57:33

标签: android android-xml

这是我得到的错误:

Execution failed for task ':MyPackage:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/abc/android-sdk-macosx/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
 No resource found that matches the given name (at 'text' with value '@string/secondary_text').

我的@string/secondary_text是这样的:

<string name="secondary_text">They&#39;re all free to download.</string>

我在这里逃避单引号,我也试过了&apos;,但仍然无效。唯一有效的是我将They're更改为They are

有没有人知道如何在Android上逃脱单引号?

1 个答案:

答案 0 :(得分:1)

您可以使用\'作为单引号。