Android SDK Installed Packages

  1.1)解压Android SKD

  1.2)执行如上目录下的文件:SDK Setup.exe,(机器人图标的那个)

  注意:一般的话会出现 Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml,所以应该修改如下几个地方:

  a)修改Available Packages,点击"add Site..",增加: http://dl-ssl.google.com/android/repository/repository.xml,当然了,你可以删除原来使用 https做连接的site.这个只能更新一些API的package.

  b)修改代理配置:Settings里Http Proxy Server:10.159.192.62,Http Proxy Port:8080,选择如下两个选项卡:Force https//.....using http...,还有一个:Ask Before restaring ADB.

  c)选择Installed package,里面会有SDK1.1,1.5,1.6,2.0和多个版本的APIs及Usb Driver package.

  至此,所有SDK安装完毕。CALL,也不知中国为什么封技术性的网站,按照如上做能够省出你更多的时间来。

  2),安装Google为我们提供的Eclipse 开发插件(ADT),地址:https://dl-ssl.google.com/android/eclipse/

Android 开发环境需要:Eclipse,Java环境,ADT,android SDK。 每个软件的下载地址,及详细的安装过程,可以参考网上各种文章。

我之前安装过Android开发环境,因为在安装Android SDK的时候出错,以为是GWF问题,而且因为当时有其它事情,就没有去查原因,今天,为了做个简单的程序,再次安装,遇到如下几个问题:

  1. 使用https下载出错
    运行“SDK Setup.exe”,提示:“Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.”
    按照提示, 在settings中,勾选“Force https://… sources to be fetched using http://…”,强制使用http协议,解决了问题。
  2. A folder failed to be renamed or moved
    网速特别忙,等啊等,终于下载完了,在安装的过程中提示:“-= Warning ! =-
    A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software .) ………”。 意思说,将杀毒软件及使用“/Android SDK/tools”目录的相关程序关掉。
    我将 MaAfee杀毒软件及防火墙关掉,将windows 文件浏览器也都关掉了,进程中可能存在的“adb.exe”进程也关掉了,甚至机器都重启了好几次,都提示相同的错误。
    无可奈何,只有“/Android SDK/tools”自己可能使用这个目录了,难道是我win7 64位系统有这个问题? 痛苦中…….,安装程序是否可以不使用“/Android SDK/tools”?

    我最后,没有再使用自动安装程序,从https://dl-ssl.google.com/android/repository/repository.xml提取出非linux及非macosx下的zip文件,见如下地址:

    下面的6个文件,解压缩到:/Android SDK/platform/下面

    https://dl-ssl.google.com/android/repository/android-1.1_r1-windows.zip

    https://dl-ssl.google.com/android/repository/android-1.5_r03-windows.zip

    https://dl-ssl.google.com/android/repository/android-2.0_r01-windows.zip

    https://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip

    https://dl-ssl.google.com/android/repository/android-1.6_r02-windows.zip

    https://dl-ssl.google.com/android/repository/android-2.1_r01-windows.zip

    如下文件解压缩到:/Android SDK/tools/下面

    https://dl-ssl.google.com/android/repository/tools_r05-windows.zip

    如下文件解压缩到:/Android SDK/usb_driver/下面

    https://dl-ssl.google.com/android/repository/usb_driver_r03-windows.zip

    如下文件解压缩到:/Android SDK/add-ons/下面

    https://dl-ssl.google.com/android/repository/google_apis-3-r03.zip

    https://dl-ssl.google.com/android/repository/google_apis-4_r02.zip

    https://dl-ssl.google.com/android/repository/google_apis-5_r01.zip

    https://dl-ssl.google.com/android/repository/google_apis-6_r01.zip

    https://dl-ssl.google.com/android/repository/google_apis-7_r01.zip

    解压后,即完成安装。

  3. emulator: ERROR: unknown virtual device name: ‘****’
    在运行程序, 在手机模拟器中查看结果的时候,发现如下错误:
    emulator: ERROR: unknown virtual device name: ’****’
    emulator: could not find virtual device named ’****’
    具体原因,是因为我修改了用户文档目录,修改到了F盘目录下。 我将“F:\Users\账号\”下面的“.android”复制一份到到“C:\Users\ 账号\”下即可。

附带两张运行成功效果图:

android example

android example 1

附加:对于第二个问题,我搜到了一个解决方法,如下:

I had the same problem: the latest update failed to install because it couldn't rename the tools folder in android-sdk-windows.  I'm using Avira antivirus and disabling it didn't help, but I don't think it had anything to do with the AV program anyway.  Fact is, running the Android SDK setup apparently uses items in the "android-sdk-windows\tools" directory.  I'm on Win 7 x64 so maybe that causes some unique situation - I'm not sure.  Solution:  - I made a copy of the tools folder itself (keeping it at the same directory tree level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).  - I ran Android.bat from that copy  - I ran the update without problems (it updated the original, not-being-used-at-the-moment tools folder, among whatever other items it needed to).  - I closed the SDK, deleted the folder (I had to kill the adb.exe process first - not sure why that always persists but you can't delete the folder without doing that).  - I restarted the SDK from the normal (now-updated) tools folder.  Worked like a charm!  Note that simply killing adb.exe was NOT sufficient to get around the original issue... only by copying the tools folder and using the copy to run Android for the duration of the update process was enough to rectify the problem.  I hope this helps others... it's quite vexing to have to spend time resolving basic issues like this just to run an update.
最后,十分感谢GWF,并没有将的所有的相关网址都屏蔽掉,知道我还是搜索到了很多有用的信息!

更多相关文章

  1. Android(安卓)单击图片切换效果
  2. android.net.LocalSocket
  3. Android点击水波纹效果
  4. Android(安卓)OpenGL学习笔记(二)之----三角形的绘制.
  5. Android开发学习 之 一、开发环境的搭建
  6. android 修改系统各种类型的声音的默认值和最大最小值
  7. android背景选择器selector用法汇总
  8. Pycharm安装PyQt5的详细教程
  9. NPM 和webpack 的基础使用

随机推荐

  1. Android ScrollView嵌套listview或Expand
  2. android本地音乐播放(二)
  3. Android之Button练习
  4. android eclipse 项目相互引用设置
  5. Android 封装http请求的工具类
  6. 智能手机软件平台 Android VS iPhone OS:
  7. 找回Kitkat的AppOps
  8. android 前后台切换 回调
  9. Android通过TCPIP协议实现断点续传上传实
  10. Android——字符高亮显示