您的位置:首页 > 其它

跨平台移动开发phonegap/cordova 3.3全系列教程-开发环境搭建

2014-07-27 00:35 796 查看
http://blog.csdn.net/mansai/article/details/18950109


操作系统:windwos xp


1. 安装JDK

打开如下网站下载JDK

http://www.oracle.com/technetwork/java/javase/downloads/index.html

根据操作系统选择下载,下载后安装。




2. 安装apache-ant

打开网站下载

http://ant.apache.org/bindownload.cgi



下载完成后,解压到E:\


3.安装ADT

下载ADT

http://developer.android.com/sdk/index.html



下载完成后,解压到E:\




4.打开eclipse.exe,安装SDK






5.安装模拟器






6.安装Node.js

打开网站下载http://nodejs.org/



下载后安装


7.配置环境变量(非常重要)

ANT_HOME与JAVA_HOME必须建立,如图



编辑系统Path,如图



加入E:\apache-ant-1.9.3\bin;C:\ProgramFiles\Java\jdk1.7.0_45\

bin;E:\adt-bundle-windows-x86-20131030\sdk\platform-tools;

保存后重新启动计算机


8. 安装cordova/phonegap





PS:按照上文进行安装时,出现错误:Error: An error occurred while listing Android targets。后来发现少加了一个android/sdk/tools的路径。
http://stackoverflow.com/questions/20323787/cordova-platform-add-android-not-working-while-listing-android-targets
To work, this cordova command needs to use some programs located into your
sdk/tools
directory.
You need also have installed apache ant.

Then you must add these directories into your
PATH
system
variable:

Background:

let's assume you have installed your Android
SDK to the
c:\sdk\android
directory

you have installed you Apache ant to the
c:\tools\apache-ant
directory

Then you must create two system variables:

ANDROID_HOME
with
the
c:\sdk\android
value

ANT_HOME
with
the
c:\tools\apache-ant
value

Finally, you must modify the
PATH
variable
and add those two to the end of the
PATH
'
value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools


NOTE: for those who uses Linux, the instruction differs a bit.

More documentation available here.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: