Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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



i am getting error like this when i am creating border in drawable folder so give ur suggestion to resolve the issue I wrote code like this can anyone help me to resolve my issue

thanks to everyone

like image 701
suraj Avatar asked Jan 24 '12 10:01

suraj


2 Answers

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

like image 103
Iman Dolatkia Avatar answered Nov 08 '22 10:11

Iman Dolatkia


You please the complete error in error log or console in GraphicLayout. Checking the spelling or typo errors that not recognized in compile time.

For example: See the typo mistake in closing layout tage below

 <LinearLauout
        android:id="@+id/layout3"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1" >

        <TextView
            android:id="@+id/text4"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/hello" />
    </LinearLauout>

The error shown in eclipse in Graphical layout view of layout xml file:

com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup Exception details are logged in Window > Show View > Error Log The following classes could not be found: - LinearLauout (Change to LinearLayout, Fix Build Path, Edit XML)

click on "change to linerlayout" it will be resolved.

And Also Check capitalized letters, e.g. LinearLayout may typed as linearlayout

like image 31
Sree Rama Avatar answered Nov 08 '22 10:11

Sree Rama