我想實現回收器視圖佈局,但我收到錯誤「渲染問題」。我試圖添加,包括,但是錯誤依然存在。我該如何解決這個問題?RecyclerView渲染問題
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/viewBg"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.waadalkatheri.popularmovies.MainActivity"
tools:showIn="@layout/activity_main"
android:layout_marginTop="@dimen/activity_vertical_margin">
<include layout="@layout/activity_main"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbars="vertical" />
</RelativeLayout>
錯誤: 我
nformation:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources]
/Users/mac/AndroidStudioProjects/popularMovies/app/src/main/res/layout/content_main.xml
Error:(2) No resource identifier found for attribute 'layout_behavior' in package 'com.example.waadalkatheri.popularmovies'
Error:(8, 26) No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').
/Users/mac/AndroidStudioProjects/popularMovies/app/build/intermediates/res/merged/debug/layout/content_main.xml
Error:(2) No resource identifier found for attribute 'layout_behavior' in package 'com.example.waadalkatheri.popularmovies'
Error:(8, 26) No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
你能顯示那個錯誤嗎? –
你能分享錯誤嗎? – sumit
我分享錯誤@sumit – user4746449