渲染错误;无法解析@ id/search_edit_frame [英] rendering error; couldn't resolve @id/search_edit_frame

查看:67
本文介绍了渲染错误;无法解析@ id/search_edit_frame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个错误,提示无法解决 @ id/search_edit_frame ,我不知道为什么, 我尝试了 File> Invalidate Caches>只是重新启动并重新启动 .androidstudio也试图更改所有支持的api的渲染版本.

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>

我正在使用Android Studio 1.2.2,并确保它可以编译 android.support.v7.widget(AppCompat)

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

任何帮助将不胜感激..谢谢

any help will be appreciated.. thanks

推荐答案

使用

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

它应该工作

这篇关于渲染错误;无法解析@ id/search_edit_frame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆