Recyclerview нельзя применять к линейному Layoutmanager - PullRequest
0 голосов
/ 24 марта 2020

setLayoutManager (androidx.widget.RecyclerView.LayoutManager) в RecyclerView не может быть применен к android .widget.linearlayout. Я получаю эту проблему, plz help

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    defaultConfig {
        applicationId "com.example.kbestwhatsappstatusdownloader"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.github.matecode:snacky:1.0.2'
    implementation "androidx.recyclerview:recyclerview:1.1.0"


}

1 Ответ

0 голосов
/ 24 марта 2020

Пожалуйста, проверьте view.findViewById (R.id.recyclerview)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...