You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "John M. Wargo (JIRA)" <ji...@apache.org> on 2013/06/04 17:01:23 UTC

[jira] [Comment Edited] (CB-3568) Path problem with Android SDK installation

    [ https://issues.apache.org/jira/browse/CB-3568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13674283#comment-13674283 ] 

John M. Wargo edited comment on CB-3568 at 6/4/13 2:59 PM:
-----------------------------------------------------------

Noticed something interesting in the previous listing - android fails, but the android tools and platform-tools folders are in the system path. I can open a terminal prompt and type android for example and it runs.

BlackBerry generates the same error:

jmw-mini:test jwargo$ cordova platform add blackberry

/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28
    tmp_dir = path.join(os.tmpdir(), 'plugman-tmp');
                           ^
TypeError: Object #<Object> has no method 'tmpdir'
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28:28)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/fetch.js:3:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
jmw-mini:test jwargo$ 
                
      was (Author: jwargo):
    Noticed something interesting in the previous listing - android fails, but the android tools and platform-tools folders are in the system path. I can open a terminal prompt and type android for example and it runs.

BlackBerry generates the same error:

Last login: Tue Jun  4 06:51:11 on console
jmw-mini:~ jwargo$ npm upgrade

Usage: npm <command>

where <command> is one of:
    add-user, adduser, apihelp, author, bin, bugs, c, cache,
    completion, config, ddp, dedupe, deprecate, docs, edit,
    explore, faq, find, find-dupes, get, help, help-search,
    home, i, info, init, install, isntall, la, link, list, ll,
    ln, login, ls, outdated, owner, pack, prefix, prune,
    publish, r, rb, rebuild, remove, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    start, stop, submodule, tag, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, version, view,
    whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /Users/jwargo/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@1.1.65 /usr/local/lib/node_modules/npm
jmw-mini:~ jwargo$ chown -R $jwargo /usr/local
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
       chown [-fhv] [-R [-H | -L | -P]] :group file ...
jmw-mini:~ jwargo$ chown -R $JWARGO /usr/local
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
       chown [-fhv] [-R [-H | -L | -P]] :group file ...
jmw-mini:~ jwargo$ npm update 
jmw-mini:~ jwargo$ npm update -g
jmw-mini:~ jwargo$ sudo npm install -g cordova
Password:
npm http GET https://registry.npmjs.org/cordova
npm http 200 https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova/-/cordova-2.8.1.tgz
npm http 200 https://registry.npmjs.org/cordova/-/cordova-2.8.1.tgz
npm http GET https://registry.npmjs.org/plugman/0.7.9
npm http GET https://registry.npmjs.org/elementtree/0.1.3
npm http GET https://registry.npmjs.org/semver/1.1.0
npm http GET https://registry.npmjs.org/shelljs/0.1.2
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/xcode/0.5.1
npm http GET https://registry.npmjs.org/ripple-emulator
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/ncallbacks/1.0.0
npm http GET https://registry.npmjs.org/request/2.11.4
npm http GET https://registry.npmjs.org/open/0.0.3
npm http GET https://registry.npmjs.org/prompt/0.2.7
npm http GET https://registry.npmjs.org/plist
npm http 200 https://registry.npmjs.org/plugman/0.7.9
npm http 304 https://registry.npmjs.org/elementtree/0.1.3
npm http 304 https://registry.npmjs.org/semver/1.1.0
npm http 304 https://registry.npmjs.org/shelljs/0.1.2
npm http GET https://registry.npmjs.org/plugman/-/plugman-0.7.9.tgz
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/xcode/0.5.1
npm http 304 https://registry.npmjs.org/ripple-emulator
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/ncallbacks/1.0.0
npm http 304 https://registry.npmjs.org/request/2.11.4
npm http 304 https://registry.npmjs.org/open/0.0.3
npm http 304 https://registry.npmjs.org/prompt/0.2.7
npm http 200 https://registry.npmjs.org/plugman/-/plugman-0.7.9.tgz
npm http 304 https://registry.npmjs.org/plist
npm WARN engine ncallbacks@1.0.0: wanted: {"node":"~0.6.7"} (current: {"node":"v0.8.14","npm":"1.1.65"})
npm WARN engine plugman@0.7.9: wanted: {"node":">=0.9.9"} (current: {"node":"v0.8.14","npm":"1.1.65"})
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/read
npm http GET https://registry.npmjs.org/node-uuid/1.3.3
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/revalidator
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/utile
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/sax/0.3.5
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/pegjs/0.6.2
npm http 304 https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/revalidator
npm http 304 https://registry.npmjs.org/connect/2.7.2
npm http 304 https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/bplist-parser
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/underscore/1.4.4
npm http GET https://registry.npmjs.org/dep-graph/1.1.0
npm http GET https://registry.npmjs.org/ncallbacks/1.1.0
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/sax/0.3.5
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/winston
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1
npm http 304 https://registry.npmjs.org/send/0.1.0
npm http 304 https://registry.npmjs.org/pegjs/0.6.2
npm http 304 https://registry.npmjs.org/osenv
npm http 304 https://registry.npmjs.org/bplist-parser
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/underscore/1.4.4
npm http 304 https://registry.npmjs.org/dep-graph/1.1.0
npm http 304 https://registry.npmjs.org/ncallbacks/1.1.0
npm WARN package.json methods@0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/cycle
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/i

> ripple-emulator@0.9.17 preinstall /usr/local/lib/node_modules/cordova/node_modules/ripple-emulator
> node thirdparty/ludicrous.js

npm http 304 https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/cycle
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/ncp
Prepare ship for ludicrous speed!

Fasten all seatbelts, seal all entrances and exits, close all shops in the mall, cancel the three ring circus, secure all animals in the zoo!

npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/request/2.12.0
npm http GET https://registry.npmjs.org/express/3.1.0
npm http GET https://registry.npmjs.org/accounting
npm http GET https://registry.npmjs.org/moment
npm http GET https://registry.npmjs.org/connect-xcors/0.5.2
npm http 304 https://registry.npmjs.org/connect-xcors/0.5.2
npm http 304 https://registry.npmjs.org/moment
npm http 304 https://registry.npmjs.org/accounting
npm http 304 https://registry.npmjs.org/express/3.1.0
npm http 304 https://registry.npmjs.org/request/2.12.0
npm WARN package.json connect-xcors@0.5.2 No README.md file found!
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/xmldom
npm http 304 https://registry.npmjs.org/connect/2.7.2
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1
npm http 304 https://registry.npmjs.org/send/0.1.0
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http 304 https://registry.npmjs.org/xmldom
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/underscore/1.2.1
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/pegjs/0.6.2
npm http GET https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/underscore/1.2.1
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/pegjs/0.6.2
npm http 304 https://registry.npmjs.org/node-uuid/1.3.3
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova

> cordova@2.8.1 install /usr/local/lib/node_modules/cordova
> node bootstrap.js

WARNING: Your system does not meet requirements to create wp7 projects. See error output below.
/bin/sh: /usr/local/lib/node_modules/cordova/lib/cordova-wp7/bin/check_reqs: Permission denied

SKIPPING wp7 bootstrap.
WARNING: Your system does not meet requirements to create wp8 projects. See error output below.
/bin/sh: /usr/local/lib/node_modules/cordova/lib/cordova-wp7/bin/check_reqs: Permission denied

SKIPPING wp8 bootstrap.
WARNING: Your system does not meet requirements to create android projects. See error output below.
The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path. Output: /bin/sh: android: command not found

SKIPPING android bootstrap.
SUCCESS: Minimum requirements for ios met.
BOOTSTRAPPING ios...
SUCCESS: ios ready to rock!
cordova@2.8.1 /usr/local/lib/node_modules/cordova
├── ncallbacks@1.0.0
├── colors@0.6.0-1
├── open@0.0.3
├── shelljs@0.1.2
├── semver@1.1.0
├── request@2.11.4
├── elementtree@0.1.3 (sax@0.3.5)
├── xcode@0.5.1 (node-uuid@1.3.3, pegjs@0.6.2)
├── prompt@0.2.7 (revalidator@0.1.5, pkginfo@0.3.0, read@1.0.4, utile@0.1.7, winston@0.6.2)
├── express@3.0.6 (methods@0.0.1, fresh@0.1.0, range-parser@0.0.4, cookie-signature@0.0.1, cookie@0.0.5, buffer-crc32@0.1.1, debug@0.7.2, commander@0.6.1, mkdirp@0.3.3, send@0.1.0, connect@2.7.2)
├── plist@0.4.3 (xmlbuilder@0.4.2, xmldom@0.1.16)
├── ripple-emulator@0.9.17 (connect-xcors@0.5.2, accounting@0.3.2, request@2.12.0, moment@1.7.2, express@3.1.0)
└── plugman@0.7.9 (ncallbacks@1.1.0, osenv@0.0.3, bplist-parser@0.0.4, underscore@1.4.4, dep-graph@1.1.0, nopt@1.0.10, xcode@0.6.0, glob@3.2.1)
jmw-mini:~ jwargo$ cd dev
jmw-mini:dev jwargo$ cd cordova-book/
jmw-mini:cordova-book jwargo$ cd test
jmw-mini:test jwargo$ ls
merges		platforms	plugins		www
jmw-mini:test jwargo$ cordova platform add android

/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28
    tmp_dir = path.join(os.tmpdir(), 'plugman-tmp');
                           ^
TypeError: Object #<Object> has no method 'tmpdir'
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28:28)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/fetch.js:3:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
jmw-mini:test jwargo$ clear

jmw-mini:test jwargo$ cordova platform add blackberry

/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28
    tmp_dir = path.join(os.tmpdir(), 'plugman-tmp');
                           ^
TypeError: Object #<Object> has no method 'tmpdir'
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/plugins.js:28:28)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/fetch.js:3:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
jmw-mini:test jwargo$ 
                  
> Path problem with Android SDK installation
> ------------------------------------------
>
>                 Key: CB-3568
>                 URL: https://issues.apache.org/jira/browse/CB-3568
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 2.7.0
>         Environment: Mac OS X
>            Reporter: John M. Wargo
>            Assignee: Filip Maj
>
> I downloaded the android sdk and extracted it to my downloads folder then added the platform-tools and tools folders to the path environment. When I create a project and issue a cordova platform add android, a bunch of stuff happens then eventually I receive an error message indicating that the process couldn't find the build.xml, but it's looking for the file in /Applications/android-sdk-macosx/tools/ant/build.xml which is not where my files are located.
> It looks like the cordova cli is forcing an absolute path for the Android SDK - looking for it in Applications instead of where I have it. The Android SDK instructions for Max OSX don't say to copy the files to Applications nor does the readme for the Cordova CLI in 2.7.
> I have a screen shot of this, couldn't find the output anywhere that I could past in here.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira