我无法添加android平台
我遵循的过程和我得到的错误
Last login: Tue Feb 11 10:33:11 on ttys000
MAC01:~ charan.pathapati$ ls
Desktop Movies Phonegap hellos tmp
Documents Music Pictures mkdir
Downloads PhoneGapApplications Public npm
Library PhoneGapApps hello soapUI-Tutorials
MAC01:~ charan.pathapati$ cd PhoneGapApps
MAC01:PhoneGapApps charan.pathapati$ sudo npm install -g cordova
Password:
npm http GET http://registry.npmjs.org/cordova
npm http 200 http://registry.npmjs.org/cordova
.....
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
[email protected] /usr/local/lib/node_modules/cordova
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
MAC01:PhoneGapApps charan.pathapati$ cordova create hello com.example.hello HelloWorld
Creating a new cordova project with name "HelloWorld" and id "com.example.hello" at location "/Users/charan.pathapati/PhoneGapApps/hello"
MAC01:PhoneGapApps charan.pathapati$ cd hello
MAC01:hello charan.pathapati$ cordova platform add ios
Creating ios project...
Preparing ios project
MAC01:hello charan.pathapati$ cordova platform add android
Error: ENOENT, no such file or directory '/Users/charan.pathapati/.cordova/lib/android/cordova/3.3.0/VERSION'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at /usr/local/lib/node_modules/cordova/src/platform.js:257:42
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:821:14
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
MAC01:hello charan.pathapati$
您已经安装了android sdk吗?还将sdk添加到您的路径中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句