问题描述
今天,我试过的PhoneGap /科尔多瓦是 Mac OS X的小牛。建筑为iOS去就好了,但建设的Android也不是没有一些猜测。
我通过Android SDK管理器安装的Android 4.2.2(我不得不使用旧版本的 API V17 ,因为它不是用较新的兼容),增加了 PATH环境变量
作为SDK的平台工具
和工具
,我想我已经准备好通过运行以下命令起飞:
PhoneGap的运行Android
不过,我得到了以下错误:
[PhoneGap的]检测Android SDK中的环境...
[PhoneGap的],用当地的环境
[PhoneGap的]加入Android平台...
[错误]创建的Android子项目的过程中发生错误。错误:在执行命令蚁族,确保你已经安装了蚂蚁,并添加到您的路径
。
被证明是真实的Apache Ant是不是在Mac OS X小牛队的路走的错误信息。
防弹解决方案:
-
下载并在终端执行以下命令安装自制软件:
-
通过自制软件执行安装Apache Ant
运行的PhoneGap构建再次,它应该成功编译和安装Android应用程序。
Today I tried PhoneGap/Cordova with Mac OS X Mavericks. Building for iOS went just fine, but building for Android wasn't without some guesswork.
I installed Android 4.2.2 via the Android SDK Manager (I had to use the older API v17 since it wasn't compatible with a newer one), added the PATH environment variables
for the SDK's platform-tools
and tools
and thought I was ready to take off by running the command:
phonegap run android
Nevertheless, I got the following error:
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project. ERROR : executing command 'ant', make sure you have ant installed and added to your path.
The error message proved to be true as Apache Ant isn't in the path of Mac OS X Mavericks anymore.
Bulletproof solution:
Download and install Homebrew by executing following command in terminal:
Install Apache Ant via Homebrew by executing
Run the PhoneGap build again and it should successfully compile and install your Android app.
这篇关于错误为Android与PhoneGap的/科尔多瓦建设时,在Mac OS X 10.9小牛队在执行命令“蚁族”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!