Android 渲染错误;不能';t解析@id/搜索\u编辑\u帧

Android 渲染错误;不能';t解析@id/搜索\u编辑\u帧,android,android-studio,android-support-library,Android,Android Studio,Android Support Library,我有一个错误,说无法解析@id/search\u edit\u frame我不知道为什么, 我尝试了文件>无效缓存>只需重新启动并重新启动android studio还尝试更改所有支持的api的渲染版本 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" myapp="http://schemas.an

我有一个错误,说无法解析@id/search\u edit\u frame我不知道为什么, 我尝试了文件>无效缓存>只需重新启动并重新启动android studio还尝试更改所有支持的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>

我正在使用AndroidStudio 1.2.2,并确保它编译了Android.support.v7.widget(AppCompat)


任何帮助都将不胜感激。。谢谢

首先,您可以在所有xml文件中搜索@id/search\u edit\u frame以检查它的来源

其次,如果确定xml中没有@id/search\u edit\u frame,则可以尝试删除生成文件夹中的所有文件

同时尝试清理项目。

使用

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


应该可以

请告诉我应该清空哪个构建文件夹。。还尝试清理我的项目。这似乎是abc_search_view.xml res文件的一部分。奇怪的是,一个已经使用v7 support SearchView一周的应用程序今天因该错误而停止渲染。安卓工作室Bug?通过切换到
android.widget.SearchView
(API 11支持),您的解决方案解决了问题,但并不理想。您提供的SearchView来自android.widget,而@johnguild正在使用的SearchView实际上来自android.support.v7.widget。