Husnain Iqbal
Husnain Iqbal

Reputation: 466

Cordova/Phonegap Installation: n error occurred while running the android project

I've been stuck here for a couple of days on building a phonegap app into android and for some hours on the current problem. I'm Trying to start work on phonegap/cordova. So facing problems in installation. Currently following this documentation of cordova. Anyone having idea about this problem

c:\Program Files\nodejs>cordova create hello com.example.hello HelloWorld
Creating a new cordova project with name "HelloWorld" and id "com.example.hello"
 at location "c:\Program Files\nodejs\hello"

c:\Program Files\nodejs>cordova platform add android

c:\Program Files\nodejs>cd hello

c:\Program Files\nodejs\hello>cordova platform add android
Checking Android requirements...
Creating android project...
Preparing android project

c:\Program Files\nodejs\hello>cordova local run android
[Error: Cordova does not know local; try help for a list of all the available co
mmands.]
---------------------------------------------------------------------------------------
c:\Program Files\nodejs\hello>cordova run android
Generating config.xml from defaults for platform "android"
Preparing android project
Running app on platform "android" via command "cmd" /c c:\Program Files\nodejs\h
ello\platforms\android\cordova\run --device
[Error: n error occurred while running the android project.
module.js:340
    throw err;
          ^
Error: Cannot find module 'c:\Program'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
]
--------------------------------------------------------------------------------------

Upvotes: 1

Views: 3674

Answers (2)

vinay Maneti
vinay Maneti

Reputation: 1451

First of all you have to download cord-ova/phone-gap latest version extract it and place it in the in any one of the drive .(or) Even you can add plugin in the eclipse/STS install it.

Then in eclipse press cntl+N to create a project and write phone-gap you will get the option from that choose and when you try to create a project from the radio button choose your which you have downloaded cordova where it is present and try it.....

Upvotes: 0

MBillau
MBillau

Reputation: 5376

What platform are you using to build this on? I know that the CLI on Windows 7 has been having problems when there are spaces in the path.

Can you try to recreate the app on a location without any spaces? For example, C:\\workspace\ or something.

Also, FWIW, local is a command that only Phonegap knows, not the regular CLI.

Upvotes: 2

Related Questions