码迷,mamicode.com
首页 > 移动开发 > 详细

Android常见错误

时间:2015-01-27 00:17:14      阅读:317      评论:0      收藏:0      [点我收藏+]

标签:

导入工程错误:

1.问题:invalid project description

解决:选中导入工程的对话框的Copy projects into workspace复选框

 

编译错误:

1.问题:layout/xml报错incorrect line ending found carriage return without corresponding newline

解决:Ctrl+1或者format该文件

2.问题:No enclosing instance of type EpisodeList is accessible. Must qualify the allocation with an enclosing instance of type EpisodeList (e.g. x.new A() where x is an instance of EpisodeList).

解决:

Episode 是 EpisodeList 内部类

EpisodeList episodeList = new EpisodeList();

Episode episode = new Episode(); 编译出错

改为:

EpisodeList episodeList = new EpisodeList();

Episode episode = episodeList.new Episode();

 

运行时错误:

1.问题:java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
 
ListView HeaderView使用过程中遇到的问题
必须在setAdapter之前执行addHeaderView方法
 
java.lang.IllegalStateException: ViewPager does not have adapter instance.
 
Caused by: java.lang.NullPointerException
android.support.v7.app.ActionBarImplICS.setNavigationMode(ActionBarImplICS.java:229)
 
ButterKnife错误:
Could not dispatch event: class com.xunlei.cloud.detail.po.DetailPo to subscribing class class com.xunlei.cloud.detail.MovieBasicFragment

Android常见错误

标签:

原文地址:http://www.cnblogs.com/liyuejiao/p/4251604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!