Failed build for Android: Execution failed for task ':app:processDebugResources'

Hi everyone :slight_smile:

Lately when I try to build android I get the following errors:

Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt

Then there is a lot of technical stuff saying

resource string/fb_app_name (aka io.ionic.starter/fb_app_name) not found.

And then the final error is:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 18s

What’s going wrong!?

1 Like

hi,
try this ,
cordova plugin add https://github.com/amritk/cordova-plugin-facebook4 --save --variable APP_ID="" --variable APP_NAME=""

your APP_ID and APP_Name it’s on your Facebook App .

What I had to do was:
Go to platforms/app/src/main/res/values/strings.xml and add:

<string name="fb_app_id">ID</string>
<string name="fb_app_name">APP_NAME</string>
14 Likes

Thank you so much for finding the solution. It’s very helpfull for me too :slight_smile:

Thanks so much !!! This solved my bug

after adding those values in the file strings, it returns me error of mergeDebugResources in the construction on duplicate values

FAILURE: Build failed with an exception.

  • What went wrong:

Execution failed for task ‘:mergeDebugResources’.

[string/fb_app_id] /Users/user/Desktop/home-made-repo/platforms/android/res/values/facebookconnect.xml [string/fb_app_id] /Users/user/Desktop/home-made-repo/platforms/android/res/values/strings.xml: Error: Duplicate resources
[string/fb_app_name] /Users/user/Desktop/home-made-repo/platforms/android/res/values/facebookconnect.xml [string/fb_app_name] /Users/user/Desktop/home-made-repo/platforms/android/res/values/strings.xml: Error: Duplicate resources