搭建Android(安卓)+ Eclipse环境时遇到的问题
近来要参与到一个Android项目中,因为之前没接触过Android,所以在搭建环境的过程中遇到了几个问题,在这里写写,供大家参考:
1、 搭建环境时出现的问题 参考:http://blog.csdn.net/sheshou2/article/details/6152988
错误信息提示
[2013-01-1009:48:01 - Info] ------------------------------
[2013-01-10 09:48:01 - Info] Android Launch!
[2013-01-10 09:48:01 - Info] Connection with adb was interrupted.
[2013-01-10 09:48:01 - Info] 0 attempts have been made to reconnect.
[2013-01-10 09:48:01 - Info] You may want to manually restart adb from theDevices view.
解决办法
重新启动eclipse
错误信息提示
[2013-01-1009:48:02 - WhNews Android Client] ------------------------------
[2013-01-10 09:48:02 - WhNews Android Client] Android Launch!
[2013-01-10 09:48:02 - WhNews Android Client] The connection to adb is down,and a severe error has occured.
[2013-01-10 09:48:02 - WhNews Android Client] You must restart adb and Eclipse.
[2013-01-10 09:48:02 - WhNews Android Client] Please ensure that adb iscorrectly located at 'D:\Program Files\android-sdk-windows \platform-tools\adb.exe'and can be executed.
解决办法
查看任务管理器,关闭所有adb.exe,然后重启eclipse即可
2、 模拟器问题
搭建好环境后,模拟器上的按键不能使,提示“DPAD not enabled AVD”,如图1所示
图1
解决办法是:Window——>AndroidVirtual Device Manager——>选项卡的Device Definitions页面——>选中一个Device,点击【Clone】按钮,自己设置数据,关键是要如图2那样设置Device。选中clone出来的Device——>点击按钮“Create AVD”,设置相应的参数即可!如图3所示。
图2
图3
3、出现的问题:
Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connection to https://dl-ssl.google.com refused
解决办法:
用notepad打开C:\Windows\System32\drivers\etc中的hosts文件,在最后一行添加
74.125.237.1 dl-ssl.google.com
更多相关文章
- 1.4 android——UI之 UI界面属性用法与注意点汇总
- Android(安卓)属性文件build.prop,获取属性以及设置属性
- LinearLayout中gravity和layout_gravity的区别;=)
- android 滚动条 相关属性
- android:windowSoftInputMode属性使用
- android TextView xml中设置最大行数
- android类
- actionbar设置menu以及获取item实例
- Android(安卓)studio上设置状态栏为透明 Android5.0