Friday 15 July 2011

cordova - Error adding android platform for phonegap -



cordova - Error adding android platform for phonegap -

i trying add together android platform using next command

cordova platform add together android

i presented next output:

creating android project... module.js:340 throw err; ^ error: cannot find module 'which' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (/users/user1/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:27:13) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ module.require (module.js:364:17) error: /users/user1/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/create: command failed exit code 8 @ childprocess.whendone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) @ childprocess.emit (events.js:98:17) @ maybeclose (child_process.js:756:16) @ process.childprocess._handle.onexit (child_process.js:823:5)

i have set path in bash_rc file such:

export path=${path}:/users/user1/android-sdk-macosx/platform-tools:/users/user1/android-sdk-macosx/platform-tools

i able add together ios platform. have updated latest android sdk well.

this incorrect:

export path=${path}:/users/user1/android-sdk-macosx/platform-tools:/users/user1/android-sdk-macosx/platform-tools

should be:

export path=/users/user1/android-sdk-macosx/platform-tools:/users/user1/android-sdk-macosx/tools:$path

you have platform-tools twice, missing tools , ${path} should $path

cordova phonegap-build

No comments:

Post a Comment