[
https://issues.apache.org/jira/browse/CB-5648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849992#comment-13849992
]
Evan Rowley edited comment on CB-5648 at 12/17/13 1:55 AM:
-----------------------------------------------------------
Thanks for replying!
Wow! That did change the error. After removing the directory and and recreating
it with the explicit package name, this is what I received. Per the error's
instructions, I've gone ahead and installed ant. This is odd however, because I
have at least a couple installations of eclipse on this laptop, one of which is
the specific android SDK version of Eclipse. I'm not sure if ant gets installed
with those or not. It could just be that it is installed and that it isn't
actually part of my path. Either way, I'm comfortable with brew managing an ant
installation.
Creating android project...
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occured during creation of android sub-project.
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: ERROR : executing command 'ant', make sure you have ant installed and
added to your path.
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:47:27
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
At this point ant is not installed and I'm thinking that I can just go ahead
and run `cordova platform add android` to get where I want to go. Instead, this
is what I get:
Creating android project...
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occured during creation of android sub-project.
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: Please install Android target 19 (the Android newest SDK). Make sure you
have the latest Android tools installed as well. Run "android" from your
command-line to install/update any missing SDKs or tools.
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:80:29
at _fulfilled
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:760:13)
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
at flush
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
I know for sure that a lot of android stuff is in my path. I'm not too sure
however about version 19. It's funny that by default, the absolute newest
version of Android is needed by cordova. I think there are a lot of Android
users who struggle to get the new version of the OS onto their mobile devices.
I'm betting that *somewhere* there is a configuration option to change this,
but I'll just go ahead and install the new version of the Android SDK. This is
going to take me a while, so I'll just conclude here and update again after the
download completes. Meanwhile, I'll reference that official documentation you
posted.
was (Author: ejr2122):
Wow! That did change the error. After removing the directory and and recreating
it with the explicit package name, this is what I received. Per the error's
instructions, I've gone ahead and installed ant. This is odd however, because I
have at least a couple installations of eclipse on this laptop, one of which is
the specific android SDK version of Eclipse. I'm not sure if ant gets installed
with those or not. It could just be that it is installed and that it isn't
actually part of my path. Either way, I'm comfortable with brew managing an ant
installation.
Creating android project...
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occured during creation of android sub-project.
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: ERROR : executing command 'ant', make sure you have ant installed and
added to your path.
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:47:27
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
At this point ant is not installed and I'm thinking that I can just go ahead
and run `cordova platform add android` to get where I want to go. Instead, this
is what I get:
Creating android project...
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occured during creation of android sub-project.
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: Please install Android target 19 (the Android newest SDK). Make sure you
have the latest Android tools installed as well. Run "android" from your
command-line to install/update any missing SDKs or tools.
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:80:29
at _fulfilled
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:760:13)
at
/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
at flush
(/Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
I know for sure that a lot of android stuff is in my path. I'm not too sure
however about version 19. It's funny that by default, the absolute newest
version of Android is needed by cordova. I think there are a lot of Android
users who struggle to get the new version of the OS onto their mobile devices.
I'm betting that *somewhere* there is a configuration option to change this,
but I'll just go ahead and install the new version of the Android SDK. This is
going to take me a while, so I'll just conclude here and update again after the
download completes.
> "cordova platform add android" fails with "Package name must look like:
> com.company.Name"
> -----------------------------------------------------------------------------------------
>
> Key: CB-5648
> URL: https://issues.apache.org/jira/browse/CB-5648
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.1.0, 3.3.0
> Environment: OS X 18.3
> Reporter: Evan Rowley
> Priority: Blocker
> Labels: newbie
>
> I was making my way through the PhoneGap 3 Beginner’s Guide by Giorigo Natili
> when I ran into the following error. Chapter 03 is on creating the HelloWorld
> app. The steps that got me to the error are:
> Step 1
> cordova create ~/the/path/to/src/ch03 HelloWorld
> Step 2
> cd ~/the/path/to/src/ch03
> Step 3
> cordova platform add android
> ^ This command doesn’t seem to work. What I get from running this is:
> Creating android project...
> /usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
> throw e;
> ^
> Error: An error occured during creation of android sub-project.
> /Users/evanrowley/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
> throw e;
> ^
> Package name must look like: com.company.Name
> at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
> at ChildProcess.exithandler (child_process.js:641:7)
> at ChildProcess.EventEmitter.emit (events.js:98:17)
> at maybeClose (child_process.js:735:16)
> at Process.ChildProcess._handle.onexit (child_process.js:802:5)
> I would really like to debug this but I don’t have the slightest clue as to
> how my environment could be verified and/or how a node application can be
> debugged. I took a look at q.js:126 and platform.js:244 and both basically
> tie into some kind of exception thingy. It would be really neat if I could
> run this in a ‘debug mode’ and see what all the variables are at certain
> breakpoints.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)