我正在学习在Ubuntu 14.04中使用Cordova 4.0然后我只是尝试测试Cordova 相机插件0.3.6 创建一个新的应用程序,例如:
cordova create camerApp com.cameratest.app camerApp
cordova platform add android
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
一旦我安装了相机插件,我就运行下一个命令来测试一切是否正常
cordova build
或另一个命令:
cordova emulate andorid
但是我从CLI获得了下一个错误
Error code 1 for command: ant with args: debug,-f,/home/xfry/coding/cordova/mycameraApp/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /home/xfry/coding/cordova/mycameraApp/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/xfry/coding/cordova/mycameraApp/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
这是实现相机插件的正确方法吗?或者我应该做更多的事情来运行它?
我能做些什么来解决这个错误?你们有些人有同样的错误吗?
感谢您的帮助!
答案 0 :(得分:2)
你可以使用下面的cordova插件, 它适用于我不适合第三方插件。
http://docs.phonegap.com/en/edge/cordova_camera_camera.md.html