I post here because this is driving me crazy.
I'm trying to get phonegap to work so: I installed ADT bundle (eclipse+adt plugin + android SDK) -> by the way their really should update that phonegap getting started tutorial which is still telling you to install all of that separately but instead of android SDK it gives you a link to the ADT bundle...
Anyway I have set my environment variables, so i can type java, javac, android, ant or whatever everything is fine.
Now when i go to my cordova-android/bin folder with cmd (i'm on windows) and type 'create "d:/dev/android/phonegaptest" "phonegaptest" "phonegaptest"' it tells me 'project already exists'. While the target folder is just an empty folder.
if instead I type 'create "d:/dev/android/any folder name which doesnt exist yet" "phonegaptest" "phonegaptest"' it tells me 'cordova-android\bin\create.js 181,5 MS JScript runtime error path not found'
How can I get this to work ? Thanks a lot
I was having same issue. Make sure that the folder in the do NOT exists already.
D:\phonegap-2.3.0\lib\android\bin>create D:\myprojects\ com.thinkcode Fone2 Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.
Project already exists!
D:\phonegap-2.3.0\lib\android\bin>create D:\myprojects\Fone com.thinkcode Fone2 Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.
Creating new android project... Copying template files... Copying js, jar & config.xml files... Copying cordova command tools... Updating AndroidManifest.xml and Main Activity...
D:\phonegap-2.3.0\lib\android\bin>
Ok I got it
Apparently you HAVE TO put com.something for package name or the JS error will come. This may seem obvious for java developers but PhoneGap is used by a lot of web devs who doesn't know anything about packages. So it SHOULD be specified, thanks again to this poorly written doc. The error doesn't tell you anything about package name problem so it doesn't help either.
Another thing: if the folder already exist it will tell you 'project already exist' so just don't create the folder manually.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With