近来要参与到一个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. 1.4 android——UI之 UI界面属性用法与注意点汇总
  2. Android(安卓)属性文件build.prop,获取属性以及设置属性
  3. LinearLayout中gravity和layout_gravity的区别;=)
  4. android 滚动条 相关属性
  5. android:windowSoftInputMode属性使用
  6. android TextView xml中设置最大行数
  7. android类
  8. actionbar设置menu以及获取item实例
  9. Android(安卓)studio上设置状态栏为透明 Android5.0

随机推荐

  1. android客户端从服务器端获取json数据并
  2. Android使用ksoap2包调用Webservice
  3. Drawable、Bitmap、byte[]之间的转换 Bit
  4. android中requestFocus
  5. Android原生SQLite常用SQL语句
  6. Android(安卓)当数据库变动时更新UI数据
  7. Android(安卓)EditText 字符个数限制[转]
  8. 短信发送--短信的发送流程(framework)
  9. android中处理XML的方式
  10. Android(安卓)webview 播放视频无法播放