Ok Im using cordova 3.0 CLI:
$ cordova create hello com.example.hello "HelloWorld"
$ cd hello
$ cordova platform add android
PROBLEM:
[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]
Then:
$ export PATH=${PATH}:/Users/Primitivo/Dropbox/mobile/sdks/adt-bundle/sdk/platform-tools:/Users/Primitivo/Dropbox/mobile/sdks/adt-bundle/sdk/tools
Again:
$ cordova platform add android
PROBLEM:
[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...]
Then: I dont know what to do, I have java installed and ant too. Please help!
您使用的是Java 6吗?我遇到了同样的问题,我不知道Java 7无法在Android上运行,并且降级为最新的Java 6 JDK,并进行了修复。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.