Re: [BUG] [FIX INCLUDED] Android create.js error, PhoneGap 2.2.0

4,439 views
Skip to first unread message

Mark

unread,
Nov 7, 2012, 3:40:08 PM11/7/12
to phon...@googlegroups.com
I received same error and fix didn't work.   Ended up being a space in my project folder path, even though it was quoted on the command line.   Changed to location without space and it worked fine.   Thank you.    

rodu...@gmail.com

unread,
Feb 27, 2013, 4:55:26 PM2/27/13
to phon...@googlegroups.com
Y
Sent from my BlackBerry wireless device from MTN

From: Bhushan Manekar <bhush...@gmail.com>
Date: Wed, 27 Feb 2013 04:39:20 -0800 (PST)
Subject: [PhoneGap] Re: [BUG] [FIX INCLUDED] Android create.js error, PhoneGap 2.2.0

Thanks Greg,
works absolutely perfect..!


On Saturday, 3 November 2012 05:57:08 UTC+11, Greg wrote:
I'm a new user and tried following the tutorial for Android with PhoneGap 2.2.0 on a Windows 7 host.  Step 3 (Setup New Project) of the tutorial doesn't work, failing with the following error:

C:\PhoneGap\phonegap-phonegap-8a3aa47\lib\android\bin>.\create C:\Users\gmlueck\Documents\eclipse-workspace\phonegap-sample com.intel.gmlueck.phonegap-sample phonegap-sample
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...
C:\PhoneGap\phonegap-phonegap-8a3aa47\lib\android\bin\create.js(31, 5) Microsoft
 JScript runtime error: Path not found

The problem is with this line in "create.js":

var ACTIVITY_PATH=PROJECT_PATH+'\\src\\'+PACKAGE_AS_PATH+'\\'+ACTIVITY+'.java';
[...]
exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\project\\Activity.java '+ ACTIVITY_PATH +' /Y');

The Windows "copy" command will not create directories that don't exist, so the command above fails because "src\PACKAGE_AS_PATH" doesn't exist.  This can be fixed with:

var ACTIVITY_DIR=PROJECT_PATH + '\\src\\' + PACKAGE_AS_PATH;
var ACTIVITY_PATH=ACTIVITY_DIR+'\\'+ACTIVITY+'.java';
[...]
exec('%comspec% /c mkdir ' + ACTIVITY_DIR);
exec('%comspec% /c copy "' + ROOT + '"\\bin\\templates\\project\\Activity.java ' + ACTIVITY_PATH + ' /Y');

-- Greg

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

safvan odiyeri

unread,
May 6, 2013, 6:51:10 AM5/6/13
to phon...@googlegroups.com
thank you so much.... your answer was so valuable... hope you can help me in the future when i need help again....


On Sat, Apr 6, 2013 at 12:03 PM, <alex.ma...@gmail.com> wrote:
hi,
you are typing: C:\phonegap\lib\android\bin>.\create C:\Users\Mathew\Documents\androidworkspace com.intel.animal animal
and you should say C:\phonegap\lib\android\bin>.\create C:\Users\Mathew\Documents\androidworkspace com.intel.animal animal animal
the 3rd argument is the folder name, if you omit it it will try to create the project in the 'example' folder, which probably exists,
hope that help,
alecu. 

joi, 7 martie 2013, 10:09:33 UTC+2, safv...@gmail.com a scris:
i have a problem while creating a new project....

C:\phonegap\lib\android\bin>.\create C:\Users\Mathew\Documents\androidworkspace com.intel.animal animal
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Project already exists!

C:\phonegap\lib\android\bin>

please help me to solve this problem.. i have tried with new names... still problem remains...

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/tnz2DnUE-E0/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.

Simon MacDonald

unread,
May 14, 2013, 1:20:42 AM5/14/13
to phonegap
I sent a pull request to have someone with a windows pc give this a try. Should be fixed for the next release.




On Sun, May 12, 2013 at 7:24 AM, Ti Pad <tsspa...@gmail.com> wrote:
Thanks a lot.
(same problem with PhoneGap 2.7.0)

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.

Simon MacDonald

unread,
May 15, 2013, 3:02:27 AM5/15/13
to phonegap
Pull request has been accepted this is fixed for 2.8.0.

If you found a bug raise and issue on JIRA:
https://issues.apache.org/jira/browse/CB
If you have a bug fix make a pull request:
https://github.com/apache/cordova-android/pulls

This email list is monitored but it is not the best place to report
bugs and bug fixes.

Simon Mac Donald
http://hi.im/simonmacdonald


Reply all
Reply to author
Forward
0 new messages