Rendering Problems Couldn't resolve resource @id/search_edit_frame

后端 未结 6 1571
时光说笑
时光说笑 2021-02-20 17:10

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

相关标签:
6条回答
  • 2021-02-20 17:27

    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" />
    
    0 讨论(0)
  • 2021-02-20 17:27
        android:id="@+id/search_edit_frame"
    

    add above line to parent layout that did the trick for me

    0 讨论(0)
  • 2021-02-20 17:27

    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!

    0 讨论(0)
  • 2021-02-20 17:33

    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.

    1. Quickest way to do that is FileInvalidate caches / Restart...Just Restart.

    2. Right click on project and Synchronize ...Project

    3. click on Build menu --> select Clean Project and then Rebuild it.
    0 讨论(0)
  • 2021-02-20 17:46

    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

    0 讨论(0)
  • 2021-02-20 17:51

    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 />
    
    0 讨论(0)
提交回复
热议问题