我试图让加在科尔多瓦的android平台。我已经添加和下载最新的SDK在Android SDK中,我的路径是:出口PATH=${PATH}:/Users/xxx/Development/android-sdk-macosx/platform-tools:Users/xxx/Development/android-sdk-macosx/tools,但我不断收到以下错误:
I'm trying to get the android platform added on cordova. I've added and downloaded the most recent SDK in Android SDK, my path is :export PATH=${PATH}:/Users/xxx/Development/android-sdk-macosx/platform-tools:Users/xxx/Development/android-sdk-macosx/tools
, but I keep getting the following error:
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
at /Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/lib/check_reqs.js:85:29
at _rejected (/Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:808:24)
at /Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:834:30
at Promise.when (/Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:752:41)
at /Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:574:44
at flush (/Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Error: /Users/xxx/.cordova/lib/android/cordova/3.5.0/bin/create: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
我是什么做错了吗?我一直寻找的答案都结束了,但似乎没有任何工作。 在此先感谢!
What am I doing wrong? I've search all over for answers, but nothing seems to work. Thanks in advance!
在的情况下的 阿帕奇科尔多瓦 与机器人工作室的0.8用于Mac OS X 10.9,如果你已安装在默认/应用程序文件夹中,在终端运行此
In case of Apache Cordova with Android Studio 0.8 for Mac OS X 10.9, if you have installed in the default /Applications folder, run this on Terminal
export ANDROID_HOME="/Applications/Android Studio.app/sdk"
export ANDROID_TOOLS="/Applications/Android Studio.app/sdk/tools/"
export ANDROID_PLATFORM_TOOLS="/Applications/Android Studio.app/sdk/platform-tools/"
PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS
要确认,运行回声并获得
To confirm, run echo and get
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Android Studio.app/sdk:/Applications/Android Studio.app/sdk/tools/:/Applications/Android Studio.app/sdk/platform-tools/
有关科尔多瓦3.6,它在一个新的Android工作室抛出另一个错误
For Cordova 3.6, it threw another error on a fresh Android Studio
Error: Please install Android target "android-19"
要解决这个问题,开放式的SDK管理器在IDE中,并下载提到的Android版本(Android为19)
To resolve this, open SDK manager in the IDE, and download the mentioned android version (android-19)