android 将布局多次添加,android – 如何在布局xml中添加循环视图
您無(wú)法將aar文件添加到Eclipse中的libs文件夾(它不是jar文件)
目前,使用新的RecyclerView的最佳方式是切換到Android Studio并將此依賴(lài)項(xiàng)添加到build.gradle
compile 'com.android.support:recyclerview-v7:+'
只是一個(gè)說(shuō)明.使用”占位符不是一個(gè)好習(xí)慣,但在這種情況下,您正在嘗試預(yù)覽版本,因此它將很快更新并穩(wěn)定發(fā)布.
您可以使用其中一個(gè)版本.
檢查您的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'
當(dāng)然你仍然可以使用Eclipse,但它需要一些手動(dòng)操作.
您可以在此文件夾中找到支持庫(kù)庫(kù)的所有版本:
sdk/extras/android/m2repository/com/android/support/
在這里你可以查看所有版本.
在文件夾中,您將找到支持庫(kù)的aar文件.
在里面你可以查看classes.jar文件,res文件夾和AndroidManifest文件.
>在工作區(qū)中創(chuàng)建項(xiàng)目
>將AAR解壓縮到某個(gè)目錄中.
>將AAR中的AndroidManifest.xml,res和assets文件夾復(fù)制到項(xiàng)目中.
>在項(xiàng)目中創(chuàng)建一個(gè)libs目錄并將其復(fù)制到classes.jar中
>添加依賴(lài)項(xiàng).
>使用SDK 23進(jìn)行編譯
>將項(xiàng)目標(biāo)記為庫(kù)
Recyclerview庫(kù)具有support-v4.jar和support-annotations-23.x.X.jar作為依賴(lài)項(xiàng).
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的android 将布局多次添加,android – 如何在布局xml中添加循环视图的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: python没有菜单栏_解决Jupyte
- 下一篇: 安装redis提示[test] erro