Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception Raises during rendering:com.android.layoutlib.bidge.MockView cannot be cast to android.vie

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am using GridLayout to design an Android APP.
My minimum SDkK version is"11" and Target is"21"

When i try to drag GridLayout in my XML file it

show error that

Exception Raises during rendering:com.android.layoutlib.bidge.MockView cannot be cast to android.view.ViewGroup.



although I have imported android.support.v7.android.GridLayout jar in My project.

this is my XMl file

<android.support.v7.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res/com.example.gridlayoutdemo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="147dp"
android:background="#F272C9"
app:columnCount="1" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_column="0"
app:layout_gravity="right|center_vertical"
app:layout_row="0"
android:text="Button" />

</android.support.v7.widget.GridLayout>



and I am not able to drag and draw any View inside this GridLayout.

Any Help
I have gone through
http://stackoverflow.com/questions/21299597/android-support-v7-widget-gridlayout-failed-to-instantiate

this ant many links

Thanks
gridLayoutError.PNG
[Thumbnail for gridLayoutError.PNG]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic