Cordova Facebook插件构建失败,浏览器无法正常工作

时间:2016-07-13 20:54:28

标签: ionic-framework ngcordova phonegap-facebook-plugin

在下一个链接http://ngcordova.com/docs/plugins/facebook/后面输入下一行

  

cordova插件添加https://github.com/Wizcorp/phonegap-facebook-plugin.git - 变量APP_ID =" 123456789" - 变量APP_NAME =" myApplication"

在本地使用插件。在这之后,离子构建发生了

2 warnings and 1 error generated.

** BUILD FAILED **


The following build commands failed:    CompileC build/AppName.build/Debug-iphonesimulator/AppName.build/Objects-normal/i386/FacebookConnectPlugin.o AppName/Plugins/phonegap-facebook-plugin/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: Error code 65 for command: xcodebuild with args:
-xcconfig,/Users/braianmellor/Desktop/AppName/platforms/ios/cordova/build-debug.xcconfig,-project,AppName.xcodeproj,ARCHS=i386,-target,AppName,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/braianmellor/Desktop/AppName/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/braianmellor/Desktop/AppName/platforms/ios/build/sharedpch`

所以我决定选择

  

cordova插件添加cordova-plugin-facebook4 --save --variable   APP_ID =" 123456789" - 变量APP_NAME =" myApplication"

它完美无缺,但当我在app.js文件的.config中添加此行时

var appID = 123456789;
var version = "v2.6";
$cordovaFacebookProvider.browserInit(appID, version);

我收到此错误:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
ReferenceError: facebookConnectPlugin is not defined

何时进行index.html并添加 现在我得到了

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
TypeError: Cannot read property 'browserInit' of undefined

请在这里需要一些帮助。 ngController的官方插件无法构建,次要的插件无法在网站上使用:(

0 个答案:

没有答案