Y
Sent from my BlackBerry wireless device from MTN
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.