修复可搜索配置 xml 文件中的构建路径错误
Fix build path error in searchable configuration xml file
我正在尝试使用 android studio 将 searchview 添加到我的 android 应用程序,但是当我第一次添加 searchable.xml 配置文件时出现此错误
the fallowing classes could not be found: -searchable (fix build path,edit xml) and layout missing attributes
当我构建项目时出现此错误:
-no resource found that matches the given name(at 'resource' with value @searchable.xml)
-execution failed for task ':app.processDebugProcess'
有帮助吗??
enter code here<?xml version="1.0" encoding="utf-8"?>
android:label="@string/search_label"
android:hint="@string/hint_search"
/>
searchable.xml 文件应位于 res/xml 文件夹中,并且应如下所示:
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:hint="@string/hint_search"
android:label="@string/search_label" >
</searchable>
我正在尝试使用 android studio 将 searchview 添加到我的 android 应用程序,但是当我第一次添加 searchable.xml 配置文件时出现此错误
the fallowing classes could not be found: -searchable (fix build path,edit xml) and layout missing attributes
当我构建项目时出现此错误:
-no resource found that matches the given name(at 'resource' with value @searchable.xml)
-execution failed for task ':app.processDebugProcess'
有帮助吗??
enter code here<?xml version="1.0" encoding="utf-8"?>
android:label="@string/search_label"
android:hint="@string/hint_search"
/>
searchable.xml 文件应位于 res/xml 文件夹中,并且应如下所示:
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:hint="@string/hint_search"
android:label="@string/search_label" >
</searchable>