Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
157 views
in Technique[技术] by (71.8m points)

android - RecyclerView is missing

I just installed the new SDK tools (Android L Developer Preview), and I'm trying to use RecyclerView but it seems to be missing.

From my understanding I should include the v7 support library, but I can't seem to do that...

I can't seem to find the v7 library in the SDK folder (I did install the Android Support Library from the SDK Manager).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have to update the android repository, the support library and you have to use this dependency:

compile 'com.android.support:recyclerview-v7:+'

UPDATED 30/10/2017:

Using the + is not a good option because you are not able to replicate the build in the future.

You can use one of these versions. Check your sdk for updated version:

  //it requires compileSdkVersion 27
  implementation 'com.android.support:recyclerview-v7:27.1.0'
  implementation 'com.android.support:recyclerview-v7:27.0.2'
  implementation 'com.android.support:recyclerview-v7:27.0.1'
  compile 'com.android.support:recyclerview-v7:27.0.0'

  //it requires compileSdkVersion 26
  //it requires to add the google maven repo 
  //  maven {
  //        url "https://maven.google.com"
  //        }
  compile 'com.android.support:recyclerview-v7:26.1.0'
  compile 'com.android.support:recyclerview-v7:26.0.2'
  compile 'com.android.support:recyclerview-v7:26.0.1'
  compile 'com.android.support:recyclerview-v7:26.0.0'

  //it requires compileSdkVersion 25
  compile 'com.android.support:recyclerview-v7:25.4.0'
  compile 'com.android.support:recyclerview-v7:25.3.1'
  compile 'com.android.support:recyclerview-v7:25.3.0'
  compile 'com.android.support:recyclerview-v7:25.2.0'
  compile 'com.android.support:recyclerview-v7:25.1.1'
  compile 'com.android.support:recyclerview-v7:25.1.0'  
  compile 'com.android.support:recyclerview-v7:25.0.0'  

  //it requires compileSdkVersion 24
  compile 'com.android.support:recyclerview-v7:24.1.1'  
  compile 'com.android.support:recyclerview-v7:24.1.0'  

  //it requires compileSdkVersion 23
  compile 'com.android.support:recyclerview-v7:23.4.0'
  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'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...