Rendering Problems Couldn\'t resolve resource @id/search_edit_frame
This is the rendering error I\'m getting in my xml file. I think it has
use this code
<SearchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/searchView"
android:iconifiedByDefault="true"
android:queryHint="Search"
android:layout_centerHorizontal="true" />
android:id="@+id/search_edit_frame"
add above line to parent layout that did the trick for me
Here is an easy one solution.
There is no need of invalidating cache Or restarting. Just add below line into your strings.xml file and problem will get solved.
<item name="search_edit_frame" type="id"/>
Bingo!
When you have lot of cache memory data are store in Android Studio
that time this type of error is coming..
There are many way to solve it.
Quickest way to do that is File
→ Invalidate caches / Restart...
→ Just Restart
.
Right click on project
and Synchronize ...Project
Build menu
--> select Clean Project
and then Rebuild
it
.I have the same problem but in eclipse IDE and I solved it by 1- click on project --> clean and it solved the problem with me
To resolve this issue, provide an
android:id="@+id/search_edit_frame"
attribute to a parent view such as
android.support.design.widget.AppBarLayout
or any ViewGroup that is parent to your SearchView.
For example:
<android.support.design.widget.AppBarLayout
android:id="@+id/search_edit_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/my_app_bar_height">
<android.support.v7.widget.SearchView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.AppBarLayout />