Android-spawn ENOENT meteorite run and gradle errors from Cordoba

I am trying to run a Meteor project on an Android device and / or emulator. When I run either meteor run --verbose android , or meteor run --verbose android-device , I get errors related to the fact that Cordoba cannot find specific gradle files. Here are some results from my console:

 sarah@sarah-ThinkPad-X220 :~/simple-todos$ meteor run --verbose android Getting installed version for platform android in Cordova project Checking Cordova requirements for platform Android [[[[[ ~/simple-todos ]]]]] => Started proxy. => Started MongoDB. Local package version is up-to-date: autopublish@1.0.4 <... removed some other "Local package" messages here ...> Preparing Cordova project from app bundle Copying resources for mobile apps Writing new config.xml Preparing Cordova project for platform Android Running Cordova app for platform Android with options --emulator ANDROID_HOME=/home/sarah/Android/Sdk/ | JAVA_HOME=/usr/lib/jvm/default-java => Started your app. => App running at: http://localhost:3000/ WARNING : no emulator specified, defaulting to nexus4 Waiting for emulator...oid Emulator | emulator: UpdateChecker: skipped version check BOOT COMPLETEpp on Android Emulator - cp: no such file or directory: /home/sarah/Android/Sdk/tools/templates/gradle/wrapper/gradlew chmod: File not found: /home/sarah/simple-todos/.meteor/local/cordova-build/platforms/android/gradle/wrapper/gradle-wrapper.properties sed: no such file or directory: /home/sarah/simple-todos/.meteor/local/cordova-build/platforms/android/gradle/wrapper/gradle-wrapper.properties Running: /home/sarah/simple-todos/.meteor/local/cordova-build/platforms/android/gradlew cdvBuildDebug -b /home/sarah/simple-todos/.meteor/local/cordova-build/platforms/android/build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true events.js:72app on Android Emulator \ throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1011:11) at Process.ChildProcess._handle.onexit (child_process.js:802:34) => Errors executing Cordova commands: While running Cordova app for platform Android with options --emulator: Error: Command failed: /home/sarah/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator at ChildProcess.exitCallback (/tools/utils/processes.js:137:23) at ChildProcess.emit (events.js:98:17) at Process.ChildProcess._handle.onexit (child_process.js:820:12) ExitWithCode:1 

Indeed, the files and directories that he is trying to access are missing. $ANDROID_HOME/tools/template/gradle/wrapper does not have a gradlew directory

 sarah@sarah-ThinkPad-X220 :~/Android/Sdk/tools/templates/gradle/wrapper$ ls gradle 

Similarly, there are no files at all in my ~/simple-todos/.meteor/local/cordova-build/platforms/android/gradle/wrapper , so there is no gradle-wrapper.properties .

I am also not sure about the meaning of spawn ENOENT error.

How can i fix this?

EDIT . I wanted to test that gradle worked on my machine, so I made an application in Android Studio and ran it on my phone - it worked fine. My Meteor project is still not working on Android, but I think this tells me that gradle is working (somewhere) on my computer.

EDIT . I searched the gradlew directory on my computer, and only the ones I found were in android-studio , and not in my $ANDROID_HOME ( ~\Android/Sdk ). Not sure what to do with this information, but it seems relevant.

EDIT It occurred to me that gradle -v output might be useful:

 $ gradle -v ------------------------------------------------------------ Gradle 2.5 ------------------------------------------------------------ Build time: 2015-08-31 14:26:53 UTC Build number: none Revision: UNKNOWN Groovy: 2.4.3 Ant: Apache Ant(TM) version 1.9.6 compiled on July 8 2015 JVM: 1.7.0_95 (Oracle Corporation 24.95-b01) OS: Linux 4.2.0-23-generic amd64 
+5
source share
1 answer

Original disclaimer: I am not very familiar with the specific tools that you use on top of android + gradle, but I will try my best to help.

It is worth reading: https://docs.gradle.org/current/userguide/gradle_wrapper.html

Also, you probably want to install gradle on your system first, and double-check that gradle home is installed (* is not always necessary, but depends on what other things, like Android studio, etc.): https : //docs.gradle.org/current/userguide/installation.html

I assume that the toolkit you are using is trying to find the gradle and / or gradlew system that it expects to have in your project ... and that it mixes up.

0
source

Source: https://habr.com/ru/post/1245523/


All Articles