DCo*_*der 7 eclipse android android-support-library android-5.0-lollipop android-recyclerview
我正在关注此链接,如我在尝试添加回收视图的链接中所述,如下所示:
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
Run Code Online (Sandbox Code Playgroud)
我已经添加android-support-v7-appcompat库项目,也尝试加入recyclerview-v7-21.0.0-rc1.aar到libs但还是我收到以下错误.
The following classes could not be found:
- android.support.v7.widget.RecyclerView
注意:我更新了Android SDK工具,Android SDK平台工具,Android SDK构建工具,Android L(API 20,L预览版)
请帮忙..
Gab*_*tti 13
您无法将aar文件添加到Eclipse中的libs文件夹(它不是jar文件)
RecyclerView目前,使用new 的最佳方法是切换到Android Studio并将此依赖项添加到build.gradle
compile 'com.android.support:recyclerview-v7:+'
Run Code Online (Sandbox Code Playgroud)
只是一张纸条.使用'+'占位符不是一个好习惯,但在这种情况下,您正在尝试预览版本,因此它将很快更新并稳定发布.
您可以使用其中一个版本.检查您的sdk以获取更新版本:
//it requires compileSdkVersion 23
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.0'
//it requires compileSdkVersion 22
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:22.1.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
//it requires compileSdkVersion 21
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.0'
Run Code Online (Sandbox Code Playgroud)
当然你仍然可以使用Eclipse,但它需要一些手动操作.
您可以在此文件夹中找到支持库库的所有版本:
sdk/extras/android/m2repository/com/android/support/
Run Code Online (Sandbox Code Playgroud)
在这里你可以查看所有版本.
在文件夹中,您将找到aar支持库的文件.在里面你可以检查classes.jar文件,res文件夹和AndroidManifest文件.
在工作区中创建项目
将AAR解压缩到某个目录中.
将AAR中的AndroidManifest.xml,the res和assets文件夹复制到项目中.
libs在项目中创建一个目录并将其复制到其中classes.jar
添加依赖项.
使用SDK 23进行编译
将项目标记为库
该Recyclerview库具有support-v4.jar与支持- annotations-23.x.X.jar作为依赖.
| 归档时间: |
|
| 查看次数: |
10957 次 |
| 最近记录: |