如何解决这个错误:ClassCastException异常:com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup [英] How to resolve this error: ClassCastException: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup

查看:2223
本文介绍了如何解决这个错误:ClassCastException异常:com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是错误的地方要问这个问题,请直接给我一个更合适的位置。

If this is the wrong place to ask this question, please direct me to a more appropriate location.

我工作在Eclipse的Andr​​oid项目。当我试图在图形视图来查看preference布局,我不断收到此错误:

I am working on an Android project in Eclipse. When I attempt to view the Preference layout in graphical view, I keep getting this error:

ClassCastException: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup

下面是我的preferences.xml:

Here is my preferences.xml:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory android:title="General">
        <CheckBoxPreference android:title="Show default categories"
            android:defaultValue="true" android:key="default_categories" />
    </PreferenceCategory>
    <PreferenceCategory android:title="Export">
        <EditTextPreference android:key="default_emailaddress"
            android:defaultValue="@string/pref_export_defaultemail"
            android:title="Email Address" android:summary="@string/pref_export_emailsummary" />
        <EditTextPreference android:key="filename_prefix"
            android:defaultValue="@string/pref_export_defaultfilename"
            android:title="Filename Prefix" android:summary="@string/pref_export_filenamesummary" />
    </PreferenceCategory>
</PreferenceScreen>

我不能为我的生活弄清楚它的谈论,我与谷歌搜索没有拿出任何实质性。

I cannot for the life of me figure out what its talking about, my searches with google have not come up with anything substantial.

推荐答案

关闭您的Eclipse并重新启动它...通常消失

Close Your Eclipse and Restart it Again...Usually Disappears

这篇关于如何解决这个错误:ClassCastException异常:com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆