0

好的,我正在使用cordova 3.0 CLI:

$ cordova create hello com.example.hello "HelloWorld"

$ cd hello

$ cordova platform add android

问题:

[Error: 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]

然后:

$ export PATH=${PATH}:/Users/Primitivo/Dropbox/mobile/sdks/adt-bundle/sdk/platform-tools:/Users/Primitivo/Dropbox/mobile/sdks/adt-bundle/sdk/tools

再次:

$ cordova platform add android 

问题:

[Error: An error occured during creation of android sub-project. An unexpected error occurred: "$ANDROID_BIN" create project --target $TARGET --path "$PROJECT_PATH" --package $PACKAGE --activity $ACTIVITY >&/dev/null exited with 1
Deleting project...]

然后:我不知道该怎么办,我也安装了java和ant。请帮忙!

4

1 回答 1

0

你在使用 Java 6。我有同样的问题,我不知道 Java 7 不能与 Android 一起使用,并且降级到最新的 Java 6 JDK,修复了它,我记得。

于 2013-09-30T14:30:43.340 回答