Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
时间:2014-08-04 13:26:17
收藏:0
阅读:319
今天在做自定义ViewGroup中,出现了一下错误提示
Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
具体解决方法:
在eclipse error log中查看错误具体出现在哪一行,然后将
if (isInEditMode()) { return; }加入即可。
这种方法同样适用于 xml布局文件中null错误。
java.lang.NullPointerException
Exception details are logged in Window > Show View > Error Log
Use View.isInEditMode() in your custom views to skip code when shown in Eclipse,布布扣,bubuko.com
评论(0)