0

When trying to add French to my app, when building it crashes on this:

Caused by: com.android.aaptcompiler.ResourceCompilationException: Failed to compile values resource file C:\Users\Me\AndroidStudioProjects\devapp\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values-fr\values-fr.xml
at com.android.aaptcompiler.ResourceCompiler.compileTable(ResourceCompiler.kt:192)
at com.android.aaptcompiler.ResourceCompiler.access$compileTable(ResourceCompiler.kt:1)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:138)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:138)
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:123)
... 32 more
Caused by: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@26f8f972.,Can not extract resource from com.android.aaptcompiler.ParsedResource@76fec1f4.,Can not extract resource from com.android.aaptcompiler.ParsedResource@1d54bbcc.
    at com.android.aaptcompiler.TableExtractor.extractResourceValues(TableExtractor.kt:270)
    at com.android.aaptcompiler.TableExtractor.extract(TableExtractor.kt:181)
    at com.android.aaptcompiler.ResourceCompiler.compileTable(ResourceCompiler.kt:188)
    ... 36 more

But English and Spanish are working just fine using the same method as French. I'm using the strings.xml translations editor for the language support. I did find out that It might be the ' in the text. I tried doing \' or ' but this didn't help it either.

mohammed_sajid
  • 233
  • 2
  • 18
  • Alright found the issue, I also had to use the \ before a !. And the ' doesn't work anymore and I replaced all of them with \' – mohammed_sajid Mar 10 '23 at 09:19

0 Answers0