这是我得到的错误:
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're all free to download.</string>
我在这里转义单引号,我尝试过 '
也是,还是没用。唯一有效的是我改变了They're
至They are
.
有人知道如何在 Android 上转义单引号吗?
最佳答案
您可以仅使用 \'
作为单引号。
关于Android - strings.xml 无法转义单引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41727312/