Skip to main content
shipi18n logo|Documentation

android-unbalanced-quote: unbalanced double-quote in an Android strings.xml

error — fails the build

A double-quote in an Android string resource that is not escaped and does not close — Android uses "…" to mark spans where whitespace and apostrophes are literal, so a stray quote leaves the span open and AAPT errors.

What triggers it

<string name="tip">say "hi there</string>

Fixed

<!-- escape a literal quote -->
<string name="tip">say \"hi there\"</string>

Why it matters

Like the apostrophe case, this is an AAPT compile error that breaks the Android build, and it is invisible once the parser has decoded the value — so it is checked against the raw resource text.

How to fix it

Escape each literal double-quote as \", or balance the quoting.

How to silence it

--ignore-keys for the specific string; usually a real build break.

Check for this in CI

npx @shipi18n/cli check ./locales -s en
# SARIF for inline PR annotations:
npx @shipi18n/cli check ./locales -s en -r sarif -o shipi18n.sarif

The structural checks need no API key. Findings of this rule link back to this page from the SARIF helpUri.

Related rules