Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase 如何解决错误:在Android studio中找不到符号导入androidx.appcompat.widget.RecyclerView_Firebase_Android Recyclerview_Google Play Services_Android Viewbinding - Fatal编程技术网

Firebase 如何解决错误:在Android studio中找不到符号导入androidx.appcompat.widget.RecyclerView

Firebase 如何解决错误:在Android studio中找不到符号导入androidx.appcompat.widget.RecyclerView,firebase,android-recyclerview,google-play-services,android-viewbinding,Firebase,Android Recyclerview,Google Play Services,Android Viewbinding,我的项目运行良好,但当我将google play services版本更新为15.0.0并将firebase添加到项目中时,我出现了以下错误: 它显示错误:找不到symbol import androidx.appcompat.widget.RecyclerView,我找到了另一个具有相同问题的线程,但没有精确指定情况,因此我决定发布一个新问题 以下是我的Gradle依赖项: def acraVersion = '5.1.3' def gmsVersion = '15.0.0' depende

我的项目运行良好,但当我将google play services版本更新为15.0.0并将firebase添加到项目中时,我出现了以下错误:

它显示错误:找不到symbol import androidx.appcompat.widget.RecyclerView,我找到了另一个具有相同问题的线程,但没有精确指定情况,因此我决定发布一个新问题

以下是我的Gradle依赖项:

def acraVersion = '5.1.3'
def gmsVersion = '15.0.0'
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'org.apache.commons:commons-text:1.7'
    implementation 'com.jakewharton:butterknife:10.2.1'
    implementation 'com.daimajia.easing:library:2.1@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'com.github.apl-devs:appintro:v4.2.2'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'co.ronash.android:pushe-base:1.4.0'
    implementation "com.google.android.gms:play-services-gcm:$gmsVersion"
    implementation "com.google.android.gms:play-services-maps:$gmsVersion"
    implementation "com.google.android.gms:play-services-places:$gmsVersion"
    //implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.orhanobut:hawk:2.0.1'
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
    implementation 'jp.wasabeef:picasso-transformations:2.1.2'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.intuit.sdp:sdp-android:1.0.5'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'
    implementation 'com.mikepenz:fastadapter:3.2.4@aar'
    implementation 'com.mikepenz:fastadapter-commons:3.2.4@aar'
    implementation 'com.mikepenz:fastadapter-extensions-expandable:3.2.7@aar'
    implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
    implementation 'com.github.yalantis:ucrop:2.2.1'
    implementation("com.mikepenz:materialdrawer:6.0.6@aar") {
        transitive = true
    }
    implementation 'co.lujun:androidtagview:1.1.4'
    implementation 'com.yarolegovich:discrete-scrollview:1.4.4'
    implementation 'jp.wasabeef:recyclerview-animators:2.3.0'
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'android.arch.navigation:navigation-fragment:1.0.0'
    implementation 'android.arch.navigation:navigation-ui:1.0.0'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
    implementation 'androidx.navigation:navigation-fragment:2.0.0'
    implementation 'androidx.navigation:navigation-ui:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
    implementation project(path: ':toasty')
    implementation project(path: ':rangebar')
    implementation project(path: ':smartlocation')
    implementation files('libs/ImageBase64Encoder.jar')
    implementation "ch.acra:acra-mail:$acraVersion"
    implementation "ch.acra:acra-dialog:$acraVersion"
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.jrvansuita:PickImage:2.2.4'
    implementation 'com.github.Cutta:TagView:1.3'
    implementation 'com.github.jakebonk:ChipView:1.0.1'

    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.squareup.retrofit2:converter-scalars:2.8.1'

    // date picker for persian date
    implementation 'com.github.aliab:Persian-Date-Picker-Dialog:1.5.2'

    def paging_version = "2.1.2"

    implementation "androidx.paging:paging-runtime:$paging_version"
    // For Kotlin use paging-runtime-ktx

    // alternatively - without Android dependencies for testing
    testImplementation "androidx.paging:paging-common:$paging_version"
    // For Kotlin use paging-common-ktx

    // optional - RxJava support
    implementation "androidx.paging:paging-rxjava2:$paging_version"
    // For Kotlin use paging-rxjava2-ktx

    //implementation "com.google.firebase:firebase-analytics:$gmsVersion"
}
apply plugin: 'com.android.library'

android {
    compileSdkVersion 27
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.android.support:support-annotations:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
}
另一个问题和答案相同但对我没有帮助的线程地址是,

我一直在尝试的其他一些解决方案: -使缓存无效并重新启动 -干净利落

另一个项目依赖项是smartlocation,它也需要google play服务,以下是此模块依赖项的gradle文件:

def acraVersion = '5.1.3'
def gmsVersion = '15.0.0'
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'org.apache.commons:commons-text:1.7'
    implementation 'com.jakewharton:butterknife:10.2.1'
    implementation 'com.daimajia.easing:library:2.1@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'com.github.apl-devs:appintro:v4.2.2'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'co.ronash.android:pushe-base:1.4.0'
    implementation "com.google.android.gms:play-services-gcm:$gmsVersion"
    implementation "com.google.android.gms:play-services-maps:$gmsVersion"
    implementation "com.google.android.gms:play-services-places:$gmsVersion"
    //implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.orhanobut:hawk:2.0.1'
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
    implementation 'jp.wasabeef:picasso-transformations:2.1.2'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.intuit.sdp:sdp-android:1.0.5'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'
    implementation 'com.mikepenz:fastadapter:3.2.4@aar'
    implementation 'com.mikepenz:fastadapter-commons:3.2.4@aar'
    implementation 'com.mikepenz:fastadapter-extensions-expandable:3.2.7@aar'
    implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
    implementation 'com.github.yalantis:ucrop:2.2.1'
    implementation("com.mikepenz:materialdrawer:6.0.6@aar") {
        transitive = true
    }
    implementation 'co.lujun:androidtagview:1.1.4'
    implementation 'com.yarolegovich:discrete-scrollview:1.4.4'
    implementation 'jp.wasabeef:recyclerview-animators:2.3.0'
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'android.arch.navigation:navigation-fragment:1.0.0'
    implementation 'android.arch.navigation:navigation-ui:1.0.0'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
    implementation 'androidx.navigation:navigation-fragment:2.0.0'
    implementation 'androidx.navigation:navigation-ui:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
    implementation project(path: ':toasty')
    implementation project(path: ':rangebar')
    implementation project(path: ':smartlocation')
    implementation files('libs/ImageBase64Encoder.jar')
    implementation "ch.acra:acra-mail:$acraVersion"
    implementation "ch.acra:acra-dialog:$acraVersion"
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.jrvansuita:PickImage:2.2.4'
    implementation 'com.github.Cutta:TagView:1.3'
    implementation 'com.github.jakebonk:ChipView:1.0.1'

    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.squareup.retrofit2:converter-scalars:2.8.1'

    // date picker for persian date
    implementation 'com.github.aliab:Persian-Date-Picker-Dialog:1.5.2'

    def paging_version = "2.1.2"

    implementation "androidx.paging:paging-runtime:$paging_version"
    // For Kotlin use paging-runtime-ktx

    // alternatively - without Android dependencies for testing
    testImplementation "androidx.paging:paging-common:$paging_version"
    // For Kotlin use paging-common-ktx

    // optional - RxJava support
    implementation "androidx.paging:paging-rxjava2:$paging_version"
    // For Kotlin use paging-rxjava2-ktx

    //implementation "com.google.firebase:firebase-analytics:$gmsVersion"
}
apply plugin: 'com.android.library'

android {
    compileSdkVersion 27
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.android.support:support-annotations:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
}

我看不出您在哪里为“androidx.recyclerview:recyclerview:1.1.0”添加了依赖项。请将“实现'androidx.recyclerview:recyclerview:1.1.0'”添加到模块级的build.gradle文件。

我看不出您在何处添加了对'androidx.recyclerview:recyclerview:1.1.0'的依赖项。请在模块级的build.gradle文件中添加“实现'androidx.recyclerview:recyclerview:1.1.0'”