1.实例一The connection to adb is down, and a severe error has occured.问题如下:  

[2013-06-03 15:57:50 - YingshiDemo] The connection to adb is down, and a severe error has occured.

[2013-06-03 15:57:50 - YingshiDemo] You must restart adb and Eclipse.


[2013-06-03 15:57:50 - YingshiDemo] Please ensure that adb is correctly located at 'E:\android\android-sdk-windows\platform-tools\adb.exe' and can be executed.

这个时候,按照Console中的建议重新启动eclipse,依然运行不了android工程,这个问题主要是ADB服务异常的问题

 解决 的方法可以在命令行下先杀死adb服务,然后重新启动服务就行:

例如 输入 先杀死adb服务:adb kill-server         然后启动adb服务    adb start-server   


错误集锦---以及解决方法_xml

成功启动服务后就可以运行android工程了。

2.实例二   xmlns:ptr="​http://schemas.android.com/apk/res-auto​"

这句话的意思是:声明xml命名空间,xmlns意思为“xml namespace”                       :冒号后面是给这个引用起的别名。

schemasxml文档的两种约束文件其中的一种,规定了xml中有哪些元素(标签)、元素有哪些属性及各元素的关系,当然从面向对象的角度理解schemas文件可以认为它是被约束的xml文档的“类”或称为“模板”。


早期或简单的xml用的是另一种约束,称为DTD约束,这东西大家天天都见到。

html/xhtml中都存在(早期的html可能没有),

如"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"。


现在大部分xml文档的约束都换成schema了,原因是schema本身也是xml,二schema扩展性强。

3.实例三            @Override 报错解决方法

这是jdk的问题,@Override是JDK5就已经有了,但有个小小的Bug,就是不支持对接口的实现,认为这不是Override 而JDK6修正了这个Bug,无论是对父类的方法覆盖还是对接口的实现都可以加上@Override。

解决方法:工程上右键-----properties-----java Compiler  ----enable project specific setting -- 选择1.6----然后ok就行了。。。

截图如下:

错误集锦---以及解决方法_ide_02