我试图使用com.phonegap.plugins.facebookconnect
插件。 要安装它,我必须提供两个变量,就像这样:
cordova plugin add com.phonegap.plugins.facebookconnect --variable APP_ID="<app_id>" --variable APP_NAME="<app_name>"
这工作,但随后的构建失败,因为这个问题 。
BUILD FAILED
/Applications/Android Studio.app/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Applications/Android Studio.app/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 6 seconds
.../platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,.../platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: .../platforms/android/cordova/run: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
解决上述问题的传统方法是消除所有平台,并重新添加。 问题是,在添加时的平台,他们尝试安装该插件为自己,但不要在插件需要正确安装,导致传递变量:
Failed to install 'com.phonegap.plugins.facebookconnect':Error: Variable(s) missing: APP_ID, APP_NAME
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:301:23
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Error: Variable(s) missing: APP_ID, APP_NAME
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:301:23
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
所以,我得到一个任意正确安装插件,但一个失败的构建,或不正确安装的插件和路过的构建。
这使得它无法使用facebookconnect插件,因为,当然,这个插件需要正确安装和构建需要传递。
这方面的任何快速的解决方案?
更多信息
$ cordova -v
3.5.0-0.2.7
相关问题
- Apache Cordova的Facebook的插件构建失败
- https://stackoverflow.com/questions/24175167/cordova-facebookconnect-compiling-error?rq=1