1:jdk没法更新
进入工具里面手动获取镜像资源 而且改成强制android
2:报错:This version of the rendering library is more recent than your version of ADapp
在布局预览中从新选择适合你的sdk的版本工具
3:当添加文本信息有黄色感叹号错误时或者报错(I18N] Hardcoded string "this is textview", should use @string resource) 布局
能够在string 添加<string name="message1">Button 2</string> 而后在在布局里面引用android:text="@string/message1"this
4:报错:No Launcher activity found! The launch will only sync the application package on the device!
活动注册中intent-filter 出了问题或者是其中的sdk版本不对code
5:报错:Premature end of file. 试一下先保存再运行对象
6:报错:The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new OnclickListener(){})接口
检查拼写是否错误ip
7:添加progressdialog控件时若是setcancelabel设为了false则必定要在代码中dismiss(—)来关闭对话框要否则一直存在没法取消没法退出程序资源
8:报错:[Accessibility] Missing contentDescription attribute on image
在一些没有文本显示的控件里,如imageView和imageButton等,ADT会提示你定义一个android:contentDescription属性,用来描述这个控件的做用
9:报错:Cannot make a static reference to the non-static field ViewHolder.leftMsg
第一种,能够把变量改为静态的。第二种,先实例化对象,而后使用对象名.变量名来调用便可(我就是由于直接用了类名来调用一直出错。。。zzz)问题
10:报错:OnClickListener cannot be resolved to a type
将“new OnClickListener”改成“new View.OnClickListener”,由于android版本升级后,将“OnClickListener”接口移到了View类中
或者是导入import android.view.View.OnClickListener;或者是拼写错误
11:The connection to adb is down, and a severe error has occured.
我遇到的问题是端口占用,能够采用netstat -ano查看是否有其余程序占用启动android adb须要的通讯端口,我当时是由于安装了两个手机助手,卸载了一个就行了。