我是使用ionic 3的新手,我尝试使用cordova-plugin-facebook4
创建登录facebook,这是完整的命令ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="tryapp"
,但是当我尝试使用此命令构建/运行时ionic cordova run android
我收到这样的错误:
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.
请有人帮我解决这个错误。
感谢。
答案 0 :(得分:1)
这不是一个非常完美的解决方案,但在遇到同样的问题后对我有用。
尝试在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>