Hi everyone, I’ve got a problem with a building of my android app. When I write meteor run android --verbose I get this error. Can someone help me? Thanks. Alessandro
Error:
Errors executing Cordova commands:
While adding plugin cordova-plugin-device@1.0.1 to Cordova project:
Cordova error: Failed to fetch plugin cordova-plugin-device@1.0.1 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
undefined
(If the error message contains suggestions for a fix, note that this may not apply to
the Meteor integration. You can try running again with the --verbose option to help
diagnose the issue.)
While adding platform Android to Cordova project:
Cordova error: CordovaError: Failed to fetch platform android
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
undefined
at
/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/platform.js:270:25
at _rejected
(/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:797:24)
at
/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:823:30
at Promise.when
(/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch
(/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:741:41)
at
/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:557:44
at flush
(/home/alexrozio96/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:448:13)
(If the error message contains suggestions for a fix, note that this may not
apply to the Meteor integration. You can try running again with the
–verbose option to help diagnose the issue.)
If that doesnt work, try removing the android platform. then do a meteor reset, and then add the android platform back to the project and try again, that sometimes helps when I get strange cordova errors to do with plugins.
Note : Meteor reset will reset your entire project. So if you need stuff in your local DB, dont do this, or at least back it up.
WARNING: The output directory is under your source tree.
=> Errors executing Cordova commands:
While building Cordova app for platform Android:
Error: /Users/alexander/Dev/web/mypage/.meteor/local/cordova-build/platforms/android/cordova/build: Command failed with exit code 8 Error output:
Exception in thread “main” java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:220)
at java.util.zip.ZipFile.(ZipFile.java:150)
at java.util.zip.ZipFile.(ZipFile.java:164)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
… 3 more
/Users/alexander/Dev/web/my/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/alexander/Dev/web/mypage/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildRelease,-b,/Users/alexander/Dev/web/mypage/.meteor/local/cordova-build/platforms/android/build.gradle,-Dorg.gradle.daemon=true
at ChildProcess.whenDone
(/Users/alexander/.meteor/packages/meteor-tool/.1.1.9.iac3tq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Socket. (child_process.js:979:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
1)You have to download manually from here : https://github.com/meteor/com.meteor.cordova-update.git.
2) You have to create a folder in your app directory named “private” and inside it, you have to make another folder called Plugins.
3) Inside of plugins folder copy that downloaded package, with his full name "com.meteor.cordova-update-master"
4) Later open the file “cordova-plugins” that you can find inside a .meteor hidden folder of your project.
5) Edit it with a text editor and add this string : com.meteor.cordova-update@file://./private/plugins/com.meteor.cordova-update-master
then run : meteor run android and all will work fine.
With this method, the plugin will be not downloaded from git, but it will be searched inside your private folder.