android环境的安装失败,Android 开发环境安装失败问题总结 win7下 ? 寻梦人

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

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

使用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协议,解决了问题。

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”?

下面的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

解压后,即完成安装。

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\ 账号\”下即可。

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

4306173_1.jpg

android example

4306173_2.jpg

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,并没有将的所有的相关网址都屏蔽掉,知道我还是搜索到了很多有用的信息!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值