but when “meteor run android-device”, it shows error:
mbp13:filesystem1 dyh$ meteor run android-devic
Error while running for mobile platforms: Error running
/Users/dyh/.meteor/packages/meteor-tool/.1.1.3.w1jfe8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-file':Error: Uh oh!
"/Users/dyh/filesystem1/.meteor/local/cordova-build/platforms/android/src/org/apache/cordova/file/EncodingException.java"
already exists!
at Object.module.exports.common.copyNewFile
.........
......
the cause of the things: i met a bug with org.apache.cordova.file@1.3.3 : https://issues.apache.org/jira/browse/CB-6428
then i have to use a higher version “cordova-plugin-file@2.0.0”.
i guess maybe meteor does not support “cordova-plugin-*” format.
there is an old news at April 21, 2015: All of our core plugins(means Cordova plugins) have changed their IDs from org.apache.cordova.* to cordova-plugin-*
Currently meteor uses Cordova 4.2.0 which currently uses the old org.apache plugins. I recently submitted a PR to the meteor repo to get Cordova 5 integrated and it has been accepted and merged into devel. I suspect it will be a part of the next release.
but then when i restart my meteor application, I get this error
Error: version not found: org.apache.cordova.media-capture@1.0.1
The fix for me was to do
cordova:org.apache.cordova.media-capture 0.3.6
To install the old version from February 2015. Then I am able to run
meteor run ios
And the application boots.
I am still pretty confused. As far as I can tell what is going on is that Meteor may not be compatible with the 1.0.1 version, but reports the error as “version not found”, which may not be the right error message.
The issue is that the current release version of Meteor includes an older version of Cordova that does not support downloading plugins from npm yet. Unfortunately, 0.3.6 is the latest version found in the old Cordova plugin registry.
I’ve been working on improvements to our Cordova integration for the Meteor 1.2 release. Among other things, this upgrades Cordova to the latest versions and takes care of converting the plugin IDs to the new format for you.
What worked for me was:-
In Meteor project folder .meteor create a file cordova-plugins and insert the line cordova-plugin-device@1.1.1… meteor will rebuild with the latest version
“cordova-plugin-device@1.1.1” will be whatever plugin@version