Reputation: 53
Android resource compilation failed Output: C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1339: error: unescaped apostrophe in string "Who should feed "First Feed" or Anna Prasana to the baby? \n\n (a) Father \n (b) Mother \n (c) Uncle (Mother's Brother) \n (d) Grand Father (Month's father) \n\n Who else can feed first?". C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1339: error: not a valid string. C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1343: error: unescaped apostrophe in string "Lamp should be facing our side or God\'s side \n\n (a) To God side, because we are offering to God \n (b) Our side, because we need the God's grace on us \n (c) Doesn't matter \n\n What is your take?". C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1343: error: not a valid string. C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1455: error: unescaped apostrophe in string "Don't loosen your belt". C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1455: error: not a valid string.Command: C:\Users\DevoDev1.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\85067246fdfeb2b4bb965a42850c6b89\aapt2-3.2.0-4818971-windows\aapt2.exe compile --legacy \ -o \ C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\res\merged\debug \ C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
Upvotes: 1
Views: 1583
Reputation: 1684
Faced the same problem after updating to 3.3.2. I ignored the current project and fresh clone or create a new project which solved the issue for me.
Upvotes: 1
Reputation: 649
In my case, I had several apostrophes in the strings that were tagged with errors. Unfortunately, the Android Studio IDE does not red-underline all words with apostrophes if there are several apostrophes in a string, so it is very easy to miss apostrophes. Look carefully at the error report and double check the strings that are labeled. You may find that you escaped SOME of the apostrophes in the string, but not all of them
Upvotes: 0
Reputation: 405
I had the same problem. Try to open values.xml via Project in android studio
C:\Users\DevoDev1\AndroidStudioProjects\Test\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
find lines: 1339, 1343, 1455 and edit them.
Upvotes: 2
Reputation: 1212
The errors are in your strings file. Replace this strings
Who should feed "First Feed" or Anna Prasana to the baby? \n\n (a) Father \n (b) Mother \n (c) Uncle (Mother's Brother) \n (d) Grand Father (Month's father) \n\n Who else can feed first?
Lamp should be facing our side or God\'s side \n\n (a) To God side, because we are offering to God \n (b) Our side, because we need the God's grace on us \n (c) Doesn't matter \n\n What is your take?
Don't loosen your belt
With:
Who should feed \"First Feed\" or Anna Prasana to the baby? \n\n (a) Father \n (b) Mother \n (c) Uncle (Mother\'s Brother) \n (d) Grand Father (Month\'s father) \n\n Who else can feed first?
Lamp should be facing our side or God\'s side \n\n (a) To God side, because we are offering to God \n (b) Our side, because we need the God\'s grace on us \n (c) Doesn\'t matter \n\n What is your take?
Don\'t loosen your belt
You missed some apostrophe and some double quotes
Upvotes: 4