为什么我设置路径时 phonegap 找不到 Android?

为什么我设置路径时 phonegap 找不到 Android?

我正在尝试设置 phonegap 来为 android 构建。

当我安装 phonegape 时,它​​告诉我:

npm WARN engine [email protected]: wanted: {"node":"~0.6.7"} (current: {"node":"0.12.5","npm":"2.11.2"})
-
> [email protected] install /home/n07070/node_modules/phonegap/node_modules/cordova
> node bootstrap.js

SUCCESS: Minimum requirements for blackberry met.
BOOTSTRAPPING blackberry...
WARNING: Your system does not meet requirements to create wp8 projects. See error output below.
/bin/sh: 1: /home/n07070/node_modules/phonegap/node_modules/cordova/lib/cordova-wp7/bin/check_reqs: not found

SKIPPING wp8 bootstrap.
WARNING: Your system does not meet requirements to create wp7 projects. See error output below.
/bin/sh: 1: /home/n07070/node_modules/phonegap/node_modules/cordova/lib/cordova-wp7/bin/check_reqs: not found

SKIPPING wp7 bootstrap.
ERROR! Could not create a native blackberry project test fixture. See below for error output.
/home/n07070/node_modules/phonegap/node_modules/cordova/lib/cordova-blackberry/bin/create: 26: [: /home/n07070/node_modules/phonegap/node_modules/cordova/spec/fixtures/projects/native/blackberry_fixture: unexpected operator
/home/n07070/node_modules/phonegap/node_modules/cordova/lib/cordova-blackberry/bin/create: 52: /home/n07070/node_modules/phonegap/node_modules/cordova/lib/cordova-blackberry/bin/create: function: not found

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: 1: android: not found

SKIPPING android bootstrap.
WARNING: Your system does not meet requirements to create ios projects. See error output below.
Xcode is (probably) not installed, specifically the command `xcodebuild` is unavailable or erroring out. Output of `xcodebuild -version` is: /bin/sh: 1: xcodebuild: not found

SKIPPING ios bootstrap.
[email protected] node_modules/phonegap
├── [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])

但是!我的 $PATH 是:

$ $PATH
sh: 1: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/media/HDD/Code/android-sdk-linux/plateform-tools:/media/HDD/Code/android-sdk-linux/tools: not found

但是,当我看时:

$ cd /media/HDD/Code/android-sdk-linux/
$ ls
add-ons  build-tools  docs  extras  platforms  platform-tools  samples  SDK Readme.txt  sources  system-images  temp  tools

我发现我的 $PATH 中有错误,但该如何修复?是否有简单的方法可以删除 phonegap 和 android sdk,将路径修复回原始状态并重新开始?

相关内容