我正在使用ubantu中的Hybrid开发ionic-2应用程序。我想在我的应用程序中添加Facebook登录,但是在安装Facebook插件应用程序构建失败后,如果我删除了Facebook插件应用程序,将成功构建,请帮助我。谢谢。
我安装的插件
ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"错误消息
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 17s
FAILED
25 actionable tasks: 1 executed, 24 up-to-date
(node:30083) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/gradlew: Command failed with exit code 1 Error output:
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:42: AAPT: error: resource string/fb_app_id (aka drinkordering.com:string/fb_app_id) not found.
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:45: AAPT: error: resource string/fb_app_name (aka drinkordering.com:string/fb_app_name) not found.
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:49: AAPT: error: resource string/fb_app_name (aka drinkordering.com:string/fb_app_name) not found.
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:42: error: resource string/fb_app_id (aka drinkordering.com:string/fb_app_id) not found.
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:45: error: resource string/fb_app_name (aka drinkordering.com:string/fb_app_name) not found.
/mnt/Workspace/work/project/ionic 2/DrinkOrdering/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:49: error: resource string/fb_app_name (aka drinkordering.com:string/fb_app_name) not found.
error: failed processing manifest.
Failed to execute aapt发布于 2018-02-09 19:59:53
当我将这些行添加到<resource> in platforms/android/app/src/main/res/values/strings.xml中时,我获得了一个更成功的构建
<string name="fb_app_id">APPID</string>
<string name="fb_app_name">APPNAME</string>该文件已经有了这些值,但是字符串名称是不同的。
我本想把这段代码放在我的主config.xml中,但我无法让它那样工作。将这些添加到res/values/facebookconnect.xml或res/config.xml中也不起作用。
发布于 2018-11-01 07:48:47
这是一个常见的科多瓦问题
cordova cleanionic cordova build androidhttps://stackoverflow.com/questions/48706617
复制相似问题