mac搭建cordova的android环境

时间:2023-03-08 23:59:29
mac搭建cordova的android环境

搭建步骤:

 1,下载cordova-android解压到自己目录

2,安装node.js:下载地址:http://nodejs.org/,解压按步骤安装即可,检测在终端输入:#npm

3,安装dos2unix,还不知道这个有什么用:#brew install dos2unix

4,安装Apache-ant命令:#brew insall  ant

5,下载android的sdk包,adt-bundle-mac解压到指定目录,

6,设置环境变量:

#export PATH=/Users/xxx/adt-bundle-mac/sdk/:/Users/xxxcordova/adt-bundle-mac/sdk/tools/:$PATH

7,创建项目:进入到cordova-android/bin里面:

# ./create /Users/xxx/firstapp com.harris  firstapp