添加工具目录后,将 Android 平台添加到 Cordova Project 3.0 中



Ok Im using 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。请帮忙!

你使用的是Java 6吗?我遇到了同样的问题,我不知道Java 7不适用于Android,并且降级到最新的Java 6 JDK,修复了它,我记得。

相关内容

  • 没有找到相关文章

最新更新