今天我用Mac OS X Mavericks尝试了 PhoneGap/Cordova 。为 iOS 构建一切顺利,但为 Android 构建并非没有一些猜测。
我通过 Android SDK Manager 安装了 Android 4.2.2(我不得不使用旧的API v17,因为它与新的 API 不兼容),添加了PATH environment variables
SDKplatform-tools
并tools
认为我已经准备好通过运行命令起飞:
phonegap run android
不过,我收到以下错误:
[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.