0

I have been trying many online tutorials for weeks now on how to build an android app for my web app using cordova and/or phonegap CLI and/or the cloud service, but I keep getting it wrong.

I lastly tried to use the cordova CLI as follows:

  • I downloaded and installed java jdk
  • I downloaded the Android SDk (verified the variables JAVA_HOME, ANDROID_HOME and PATH)
  • I downloaded and installed nodeJs
  • Installed cordova via: npm install -g cordova (which I verified the version to be 6.2)
  • I created a new folder for the cordova project and entered the folder
  • I Added the android platform thus: cordova platform add android When I ran: cordova build android, I had an error like that HERE.

I discovered gradle was the problem and I donloaded and used it locally as @Gandhi suggested, then I had a shorter response now (the portion in red ink of the picture in the above link). I have been researching in vain and I really think I am now stuck. I run on windows 10, an hp notebook, 64-bits, core-i3 cordova build android CLI error

Community
  • 1
  • 1
nkcho
  • 21
  • 5
  • After you installed the android sdk, configured ANDROID_HOME and updated the path, you have to run the androidcommand to actually download the sdk tools and android platform. Check this answer http://stackoverflow.com/questions/30304599/error-in-building-android-app-using-apache-cordova – Zoran Pandovski Jun 29 '16 at 13:35
  • I just downloaded and updated all of the SDK pludins it recommended on startup, and still to no avail. I really do not understand what the message in red ink is saying. I really think something else is the problem rather than the android sdk. I still see some _gradle_ in the message – nkcho Jun 29 '16 at 20:43
  • Then your problem is in Gradle. For running Gradle, firstly add the environment variable GRADLE_HOME. This should point to the unpacked files from the Gradle website. Next add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle. – Zoran Pandovski Jun 30 '16 at 08:54
  • I just unpacked gradle and added my vaiable GRADLE_HOME and included the PATH (echo %GRADLE_HOME%/bin), both manually, but I still got the message in red ink. The message in red points to the files: /platforms/android/gradlew and build.gradle with some additional arguments, but I don't understand them – nkcho Jun 30 '16 at 20:53

0 Answers0