node.js - Installing a PhoneGap plugin: BarcodeScanner -
i want install barcodescanner plugin in phonegap project. i've read readme within repository , says must installed plugman so:
install plugin ---------------- $ plugman install --platform <platform> --project <directory> --plugin <plugin> [--variable name=value] parameters: - platform <platform>: 1 of android, ios, blackberry10, wp7 or wp8 - project <directory>: path reference cordova-generated project of platform specify - plugin <plugin>: 1 of path reference local copy of plugin, or remote https: or git: url pointing cordova plugin (optionally append #branch:subdir) or plugin id http://plugins.cordova.io - variable name=value: plugins require install-time variables defined. these things api keys/tokens or other app-specific variables.
when run following command within project directory:
cordova plugin add com.phonegap.plugins.barcodescanner
i following error response:
fetching plugin "com.phonegap.plugins.barcodescanner" via plugin registry installing "com.phonegap.plugins.barcodescanner" android error during processing of action! attempting revert... failed install 'com.phonegap.plugins.barcodescanner':error: uh oh! "/users/joel/desktop/sites/sampleproject/sampleproject/plugins/com.phonegap.plugins.barcodescanner/src/android/com.google.zxing.client.android.captureactivity.jar" not found! @ object.module.exports.common.copyfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:20:40) @ object.module.exports.common.copynewfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:37:16) @ module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:42:20) @ object.actionstack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:47:25) @ handleinstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:20) @ /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:303:20 @ _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54) @ self.promisedispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30) @ promise.promise.promisedispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13) @ /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44 error: uh oh! "/users/joel/desktop/sites/sampleproject/sampleproject/plugins/com.phonegap.plugins.barcodescanner/src/android/com.google.zxing.client.android.captureactivity.jar" not found! @ object.module.exports.common.copyfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:20:40) @ object.module.exports.common.copynewfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:37:16) @ module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:42:20) @ object.actionstack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:47:25) @ handleinstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:20) @ /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:303:20 @ _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54) @ self.promisedispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30) @ promise.promise.promisedispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13) @ /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44 joels-macbook-pro:unisaver joel$ cordova plugin add com.phonegap.plugins.barcodescanner fetching plugin "com.phonegap.plugins.barcodescanner" via plugin registry installing "com.phonegap.plugins.barcodescanner" android error during processing of action! attempting revert... failed install 'com.phonegap.plugins.barcodescanner':error: uh oh! "/users/joel/desktop/sites/sampleproject/sampleproject/plugins/com.phonegap.plugins.barcodescanner/src/android/com.google.zxing.client.android.captureactivity.jar" not found! @ object.module.exports.common.copyfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:20:40) @ object.module.exports.common.copynewfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:37:16) @ module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:42:20) @ object.actionstack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:47:25) @ handleinstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:20) @ /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:303:20 @ _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54) @ self.promisedispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30) @ promise.promise.promisedispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13) @ /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44 error: uh oh! "/users/joel/desktop/sites/sampleproject/sampleproject/plugins/com.phonegap.plugins.barcodescanner/src/android/com.google.zxing.client.android.captureactivity.jar" not found! @ object.module.exports.common.copyfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:20:40) @ object.module.exports.common.copynewfile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:37:16) @ module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:42:20) @ object.actionstack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:47:25) @ handleinstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:20) @ /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:303:20 @ _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54) @ self.promisedispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30) @ promise.promise.promisedispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13) @ /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
what doing wrong? should copying files directory within project directory? or there other commands should run before using plugman?
not sure wrong here, think plugin on http://plugins.cordova.io wrong.
you can try install git url @ least me (on windows cordova 3.5) broken when doing that.
what did work following (note need have git installed):
git clone https://github.com/wildabeast/barcodescanner.git
cd cordova project.
cordova plugin add insertpath\barcodescanner
Comments
Post a Comment