Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rendering error; couldn't resolve @id/search_edit_frame

I am having an error that says couldn't resolve @id/search_edit_frame I don't know why, I tried the File>Invalidate Caches> Just Restart and restart android studio also tried to change the render version all of my supported api..

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   myapp="http://schemas.android.com/apk/res-auto"
   android:layout_width="match_parent"
   android:layout_height="match_parent">
   <android.support.v7.widget.SearchView
      android:id="@+id/svSearch"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:textSize="25sp"
      android:textColor="@color/textDefault"
       myapp="@string/search_hint"
       myapp="false" />
</LinearLayout>

I'm using Android Studio 1.2.2 and sure that it compiles android.support.v7.widget(AppCompat)

any help will be appreciated.. thanks

like image 859
johnguild Avatar asked Jul 17 '15 02:07

johnguild


Video Answer


1 Answers

Use

 <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" />

it should work

like image 82
Pablo Pantaleon Avatar answered Sep 27 '22 19:09

Pablo Pantaleon