0

After hours of struggling I decided to reread the whole cordova documentation, I noticed this.

To add support or rebuild a project for any platform, you need to run the command-line interface from the same machine that supports the platform's SDK. The CLI supports the following combinations:

iOS (Mac)
Android (Mac, Linux) <------
BlackBerry 10 (Mac, Linux, Windows)
Windows Phone 7 (Windows)
Windows Phone 8 (Windows)
Windows 8 (Windows)
Firefox OS (Mac, Linux, Windows)

Is it true that I cant use the cli on windows for android? I have the SDK for android installed on my machine, so IDK why it doesn't say windows?

Are there any workarounds, should I avoid the cli and build my app myself?

The reason why I ask is in the cli I run cordova platform add android I get errors, and have done everything in my power for the last 10 hours to get it to work.

Michael Joseph Aubry
  • 12,282
  • 16
  • 70
  • 135
  • 1
    You can use Command Line Interface for windows as well. You have already Android installed correctly then follow the Cordova Document. First go through http://cordova.apache.org/docs/en/3.1.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide – Amit Gupta Nov 20 '13 at 05:55
  • Okay thanks... I am re installing everything and carefully following the docs, hopefully I fix the platform add android error – Michael Joseph Aubry Nov 20 '13 at 06:10

1 Answers1

1

1) You can use CLI commands in windows OS. I personally develop for Android in windows.

2) Its highly recommended to use CLI as it makes the life easy for adding/removing any plugin usage.

3) For the CLI to work correctly, you may require to install Ant, NodeJS.

Purus
  • 5,701
  • 9
  • 50
  • 89
  • I've installed everything, I did a system restore to refresh the PATH variable, reset everything now I get a new error [Error: An error occured during creation of android sub-project. ] – Michael Joseph Aubry Nov 20 '13 at 09:55
  • This is due to that when the PATH variable is not set correctly to access "java" and "ant".; Try running "java" and "ant" in your command prompt. – Purus Nov 20 '13 at 10:04
  • Check this too http://stackoverflow.com/questions/19159253/an-error-occurred-during-creation-of-android-sub-project-because-a-path-is-not-f – Purus Nov 20 '13 at 10:05
  • Yeah thanks, I came across this post like three times, it helped I think. What I did was do a system restore to reset the path variables, then reinstalled everything in order, its working now running via cli. – Michael Joseph Aubry Nov 21 '13 at 02:34