我真的无法在 Android 支持库中找到 Recycle Viewer
I Really Can't find Recycle Viewer in Android Support Libraries
我想在我的项目中使用 RecyclerView
,但我无法导入它。
我添加到 gradle:
在我的项目中编译'com.android.support:design:22.2.1'
我该怎么办?
在gradle:app
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'}
在我导入的包下:
import android.support.v7.widget.RecyclerView;
无法解析符号 "RecyclerView"
在gradle
中使用编译'com.android.support:recyclerview-v7:23.0.1'
并更新您的 SDK
targetSdkVersion 23
现在支持了
添加到您的应用程序build.gradle
compile 'com.android.support:recyclerview-v7:23.1.1'
你的targetSDKVersion为23
并将此代码粘贴到您的布局文件中
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
我想在我的项目中使用 RecyclerView
,但我无法导入它。
我添加到 gradle:
在我的项目中编译'com.android.support:design:22.2.1'
我该怎么办?
在gradle:app
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'}
在我导入的包下:
import android.support.v7.widget.RecyclerView;
无法解析符号 "RecyclerView"
在gradle
中使用编译'com.android.support:recyclerview-v7:23.0.1'并更新您的 SDK
targetSdkVersion 23
现在支持了
添加到您的应用程序build.gradle
compile 'com.android.support:recyclerview-v7:23.1.1'
你的targetSDKVersion为23
并将此代码粘贴到您的布局文件中
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />