Com.android.layoutlib.bridge.MockView cannot be added to android.view.ViewGroup



I get an error like this when I create a border in a folder with the ability to transfer, so give ur an offer to solve the problem I wrote code like this that can help me solve my problem.

thanks to everyone

+6
source share
2 answers

Close your eclipse and restart it again ... Often disappears

+6
source

You may get a complete error in the error log or console in GraphicLayout. Check for spelling or typos that were not recognized at compile time.

For example: See typo error closing layout 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> 

Error displayed in eclipse in graphical layout view of xml file layout:

com.android.layoutlib.bridge.MockView cannot be added to android.view.ViewGroup The exception information is logged in the window> Show view> Error log The following classes could not be found: - LinearLauout (change to LinearLayout, fix assembly path, edit XML )

click "change to linerlayout", it will be enabled.

And also check the capital letters, for example. L inear L ayout can be dialed as l inear l ayout

+2
source

Source: https://habr.com/ru/post/906751/


All Articles