首页 > 移动平台 > 详细

Android常见错误

时间:2015-01-27 00:17:00      阅读:408      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!