在mac 下配置android 开发

  

                                   在mac 下配置android 开发 html

     星期五买了台androidmini ,因此就用mac系统了。 java

      首先下载eclipse啦,但要看看你系统是几位的,mac也有64位的。怎么看呢? android

apple --》关于本机--》更多信息 macos

     


      下载完成eclipse了(我是下载的是ersion: Juno Service Release 1),打开eclipse,他会本身提示你更新你的java的,由于mac系统都内置了java了。  bash

     下载sdk了,http://developer.android.com/sdk/index.html. app

   解压sdk ,配置sdk环境 eclipse


配置sdk环境 : google

    设定.bash_profile 这样咱们就可使用adb命令了。 spa

1.终端中输入 cd ~ 3d

2.输入touch .bash_profile 回车

3.输入open -e .bash_profile

回车后会在TextEdit中打开这个文件(若是未配置过环境变量,应该是个空白文件。

export PATH=${PATH}:/software/develop/android-sdk-macosx/platform-tools/    这个是个人路径,须要你们根据本身的路径作修改。

记得要按住 command+s 保存

接着在控制台输入 adb,若是没有出现命令找不到的错误,就算成功了


     双击解压,发现他自带了 eclispe!  而且都安装好了adt了 。 但他那个eclipse不能开发javaEE的,有童鞋就像我那么苦逼,又要开发服务端,和客户端,没办法,又要在eclispe 下面安装了ADT了

    http://developer.android.com/sdk/installing/installing-adt.html ;

 官方的教程:


  • If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.

If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:

  1. Download the ADT Plugin zip file (do not unpack it):
    Package Size MD5 Checksum
    ADT-21.0.1.zip 13569302 bytes acfb01bf3fd1240f1fc21488c3dd16bf
  2. Start Eclipse, then select Help > Install New Software.
  3. Click Add, in the top-right corner.
  4. In the Add Repository dialog, click Archive.
  5. Select the downloaded ADT-21.0.1.zip file and click OK.
  6. Enter "ADT Plugin" for the name and click OK.
  7. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  8. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  9. Read and accept the license agreements, then click Finish.

    If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.

  10. When the installation completes, restart Eclipse.

To update your plugin once you've installed using the zip file, you will have to follow these steps again instead of the default update instructions.

官网上有介绍你怎么安装的,但英文也许令一些童鞋感到迷茫 。 我就说说步骤。 其实有两种方法,一个是在线安装,一个是离线安装。

 在线安装速度很慢,除非你跨墙。 我懒得找代理,就用离线。

  eclispe adt http://dl.google.com/android/ADT-21.0.1.zip

提示: 最好安装个迅雷,迅雷官方也有mac版本。

下载好了,不用解压,打开eclipse  ,点击 Help > Install New Software

点击add , 就会弹出个框出来 , 点击Archive , 打开到你下载的zip包中, 点击肯定后,

在name处输入:ADT Plugin    这个随便输入什么名字均可以。

肯定,但提醒一点,,把这个沟去掉先。

否则他会自动找须要的包,假如你安装不成功,再把这个选项选上。 假如再不成功,你多是你以前安装不成

,搞到eclipse 有点错误,没事,重新解压eclipse 。
   

   安装好eclipse adt了,见到adroid的图标了,但发现android sdk manager 有错误,

说什么链接不到,或者下面进度条特慢,其实又是墙搞的鬼。

   打开你的终端,不知道终端怎么打开的,百度。  

  输入命令 sudo vi /etc/hosts 

  而后他会提示你输入密码 ,

 输入密码后,就会看到hosts的内容,点击i 进入编辑模式

在最后一行,输入   74.125.237.1 dl-ssl.google.com

按键盘 esc 退出编辑模式

敲入 :wq   点击回车。 :wq就是保存和退出.  

基本步骤都OK了,能够开发了

相关文章
相关标签/搜索