为了账号安全,请及时绑定邮箱和手机立即绑定

第三方定义的控件的时候报了以下错误导致无法在预览界面看到预览效果

第三方定义的控件的时候报了以下错误导致无法在预览界面看到预览效果

永不认输0 2016-07-09 23:33:24
在哪个地方加上if(!isInEditMode()){}? 我该怎么找到错误呢Missing styles. Is the correct theme chosen for this layout?Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.Failed to parse file D:\rupeng.workPlace\androidProject1\appcompat_v7\res\layout\select_dialog_item_material.xmlCouldn't find theme resource ?attr/listPreferredItemPaddingLeft for the current themeCouldn't find theme resource ?attr/listPreferredItemPaddingRight for the current themeCouldn't find theme resource ?attr/listPreferredItemHeightSmall for the current theme"?attr/listPreferredItemPaddingLeft" in attribute "paddingLeft" is not a valid format."?attr/listPreferredItemPaddingRight" in attribute "paddingRight" is not a valid format."?attr/listPreferredItemHeightSmall" in attribute "minHeight" is not a valid format.Couldn't find theme resource ?attr/textAppearanceListItemSmall for the current themeException details are logged in Window > Show View > Error LogThe following classes could not be found:android.view.InflateExceptionat android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)at android.view.LayoutInflater.inflate(LayoutInflater.java:466)at android.view.LayoutInflater.inflate(LayoutInflater.java:372)at android.view.BridgeInflater.inflate(BridgeInflater.java:183)at com.handmark.pulltorefresh.library.internal.LoadingLayout.(LoadingLayout.java:78)at com.handmark.pulltorefresh.library.internal.RotateLoadingLayout.(RotateLoadingLayout.java:42)at com.handmark.pulltorefresh.library.PullToRefreshBase$AnimationStyle.createLoadingLayout(PullToRefreshBase.java:1545)at com.handmark.pulltorefresh.library.PullToRefreshBase.createLoadingLayout(PullToRefreshBase.java:676)at com.handmark.pulltorefresh.library.PullToRefreshBase.init(PullToRefreshBase.java:1286)at com.handmark.pulltorefresh.library.PullToRefreshBase.(PullToRefreshBase.java:116)at com.handmark.pulltorefresh.library.PullToRefreshAdapterViewBase.(PullToRefreshAdapterViewBase.java:74)at com.handmark.pulltorefresh.library.PullToRefreshListView.(PullToRefreshListView.java:49)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:525)at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.instantiateClass(ProjectCallback.java:438)at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(ProjectCallback.java:190)at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:206)at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:131)at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:739)at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)at android.view.LayoutInflater.rInflate(LayoutInflater.java:711)at android.view.LayoutInflater.inflate(LayoutInflater.java:489)at android.view.LayoutInflater.inflate(LayoutInflater.java:372)TextView (Change to android.widget.TextView, Fix Build Path, Edit XML) The following classes could not be instantiated:com.handmark.pulltorefresh.library.PullToRefreshListView (Open Class, Show Error Log) See the Error Log (Window > Show View) for more details. Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
查看完整描述

2 回答

?
心照不宣0504

TA贡献1条经验 获得超0个赞

有可能是attr文件里的东西没定义吧

查看完整回答
反对 回复 2016-07-12
?
永不认输0

TA贡献1条经验 获得超0个赞

已解决

查看完整回答
反对 回复 2016-07-10
  • 2 回答
  • 0 关注
  • 2815 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信