android平台出现网络不可达及DeviceMonitor: Connection

自己的笔记本自从去年初安装了squeeze(当时还是testing),就一直没有重新安装,所以也就是一直升级,升级到稳定squeeze,再升级到Wheezy(testing).最近学校课程设计要求使用

Android SDK,所以就按照官方文档安装了,再安装玩ADT后,想更新安装包,怎么也无法链接到android下载包的网站,出现网络不可达错误.而且新建一个Android Project的话,在模拟

console会出现

DeviceMonitor: Connection 之类的错误信息. GOOGLE后,发现这个问题就是出现在Debian Squeeze(当时也还是testing)上,而我的系统正好是从Squeeze升级而来的.在这个过程中,配置文件没有更新,所以导致这样的错误. 我察看了一下Squeeze稳定版本,及Wheezy(testing),Sid(unstable)该配置文件均已不存在. 
root@debian:/etc/sysctl.d# cat /etc/sysctl.d/bindv6only.conf 
# This sysctl sets the default value of the IPV6_V6ONLY socket option.
#
# When disabled, IPv6 sockets will also be able to send and receive IPv4
# traffic with addresses in the form ::ffff:192.0.2.1 and daemons listening
# on IPv6 sockets will also accept IPv4 connections.
#
# When IPV6_V6ONLY is enabled, daemons interested in both IPv4 and IPv6
# connections must open two listening sockets.
# This is the default behaviour of almost all modern operating systems.

net.ipv6.bindv6only = 1

把1改为0即可,详细的解释在注释里面.


参考:

1.  http://stackoverflow.com/questions/3461033/android-development-ddms-from-command-line-not-seeing-devices

2. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044


你可能感兴趣的:(android,Debian,网络,平台,testing,Sockets)