How to import RecyclerView for Android L-preview

前端 未结 22 1653
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 14:55

Trying to use the new RecyclerView from the support library. I downloaded the 20 update for the support library using the SDK manager.

I\'ve added the jar file to th

22条回答
  •  无人及你
    2020-12-02 15:55

    include the dependency in the build.gradle, and sync the project with gradle files

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:25.1.0'
    
        //include the revision no, i.e 25.1.1
        implementation 'com.android.support:recyclerview-v7:25.1.1'
    }
    

    Include the revision(here its 25.1.1) to avoid unpredictable builds, check library revisions

提交回复
热议问题