Frank Andrew
Frank Andrew

Reputation: 917

Ionic 3, Cannot build android after install cordova-plugin-facebook4

I'am newbie to use ionic 3, I have tried to create login with facebook using cordova-plugin-facebook4 , this is full command ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="tryapp", but when I try to build/run with this command ionic cordova run android I get error like this:

C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:42: AAPT: error: resource string/fb_app_id (aka com.tryapp:string/fb_app_id) not found.

C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:45: AAPT: error: resource string/fb_app_name (aka com.tryapp:string/fb_app_name) not found.

C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:49: AAPT: error: resource string/fb_app_name (aka com.tryapp:string/fb_app_name) not found.

C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:42: error: resource string/fb_app_id (aka com.tryapp:string/fb_app_id) not found.
C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:45: error: resource string/fb_app_name (aka com.tryapp:string/fb_app_name) not found.
C:\Users\frank\Documents\Training\ionic3\tryapp\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:49: error: resource string/fb_app_name (aka com.tryapp:string/fb_app_name) not found.
error: failed processing manifest.

Please anyone help me to solve this error.

Thanks.

Upvotes: 0

Views: 404

Answers (1)

Mahesh Jadhav
Mahesh Jadhav

Reputation: 1089

This is not a very perfect solution but worked for me after having the same issue.

Try adding this inside your config.xml

<platform name="android">
  <config-file parent="/resources" target="./res/values/strings.xml">
    <string name="fb_app_id">1234</string>  // your app id and not just "1234"
    <string name="fb_app_name">foobar</string>  // same here your app name
  </config-file>

Upvotes: 1

Related Questions