关于android开发环境的建立

来源:互联网 发布:云凡免流软件下载 编辑:程序博客网 时间:2024/05/22 13:19

   自己的第一篇介绍ANDROID的文章,自然而言的要从他的历史和他的安装环境搭建讲起。

1- android的历史

     android采用了c语言访问底层硬件,使用java作为应用程序进行开发。作为个人用户或者企业,可以开一个公司定义android系统,也可以定制app开发。android的含义是机器人

 

2-android的开发环境的安装

   

   step1 -- 首先安装javasdk,也就是JDK的开发环境,安装后,需要配置jdk环境,在PC的环境变量系统中,添加java_home, path,classpath=.

   step2 - android sdk的下载,这里边需要强调的一点,是在win7开发环境下,应为涉及到权限的问题,会导致在升级和安装插件时会出问题,因此建议安装到D盘去。

   step3-安装完成后,需要升级android sdk的内容。因为google关闭了国内的网站地址升级方法,因此建议修改c:/windows/system32/drivers/etc/host文件,修改为:

 

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
# ::1             localhost


#Google主页

203.208.46.146 www.google.com

#这行是为了方便打开Android开发官网 现在好像不翻墙也可以打开

74.125.113.121 developer.android.com

#这是新添加的地址

74.125.237.1       dl-ssl.google.com 

#更新的内容从以下地址下载

203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com


       step4-- 运行ANDROID SDK目录当中的 SDK Manager.exe程序,安装android的sdk更新,包括android系统的版本,通常2.3.4.0.3。0都是比较常用的,还有一些安装的例子,可以自行选择区安装。(当前了这部分的安装时间,比较长,需要耐心等待)。

 

      step5- 安装eclipse,对于eclipse的版本,通常需要选择class版本就可以,然后安装adt即可。这里需要讲解一下ADT的安装方法,因为google国内无法访问了。

     

       启动Eclipse,菜单点击进入Help -> Install New Software,在出现的窗口中点击Add按钮,然后在Name中输入你自定义的名称,Location中输入:

http://dl-ssl.google.com/android/eclipse

 

到这里基本的安装过程就OK了,现在开始逐步的熟悉和调测运行我们的第一个andorid程序了。