Cannot resolve symbol default_web_client_id in Firebase's Android Codelab

前端 未结 19 1332
说谎
说谎 2021-02-01 05:18

I am trying to learn Firebase, so I went through the Android Codelab. The project they gave me however, had an error:

Cannot resolve symbol default_web_cl

19条回答
  •  囚心锁ツ
    2021-02-01 06:05

    Generic solution for this is to apply google play services plugin at the end of build.gradle like this

      apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 30
        buildToolsVersion "30.0.0"
    
        buildFeatures {
            dataBinding true
        }
    
        defaultConfig {
            applicationId "xxxxxx"
            minSdkVersion 21
            targetSdkVersion 30
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
            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.2.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    
    
    
        testImplementation 'junit:junit:4.13'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        // For Common Dimension
        implementation 'com.intuit.sdp:sdp-android:1.0.5'
        implementation 'com.intuit.ssp:ssp-android:1.0.5'
        // Retrofit and Gson
        implementation 'com.google.code.gson:gson:2.8.6'
        implementation 'com.squareup.retrofit2:retrofit:2.6.1'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
        implementation 'com.squareup.retrofit2:converter-scalars:2.6.1'
        // Rx Java and Dagger
        implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
        implementation 'io.reactivex:rxandroid:1.2.1'
        implementation 'io.reactivex:rxjava:1.1.6'
    
        implementation 'com.google.dagger:dagger:2.24'
        annotationProcessor 'com.google.dagger:dagger-compiler:2.24'
        compileOnly 'javax.annotation:jsr250-api:1.0'
        compileOnly 'org.glassfish:javax.annotation:10.0-b28'
        // Glide Image Loading
        implementation 'com.github.bumptech.glide:glide:4.9.0'
        annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
        implementation 'com.android.support:design:30.0.0'
        implementation 'com.android.support:recyclerview-v7:30.0.0'
        implementation 'com.android.support:cardview-v7:30.0.0'
        implementation 'com.android.support:multidex:1.0.3'
    
        /*Jsoup*/
        implementation 'org.jsoup:jsoup:1.9.1'
    
        /*Firebase*/
        implementation 'com.google.firebase:firebase-core:17.5.0'
        implementation 'com.google.firebase:firebase-config:19.2.0'
        implementation 'com.google.firebase:firebase-messaging:20.2.4'
        implementation 'com.google.firebase:firebase-database:19.3.1'
        implementation 'com.google.firebase:firebase-auth:19.3.2'
        implementation 'com.firebaseui:firebase-ui-storage:6.2.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'com.google.firebase:firebase-analytics:17.5.0'
    
        /*location and google map*/
        implementation 'com.google.android.gms:play-services-maps:17.0.0'
        implementation 'com.google.android.gms:play-services-location:17.0.0'
        implementation 'com.google.android.gms:play-services-places:17.0.0'
        implementation 'com.google.android.gms:play-services-auth:18.1.0'
    
        /*Circle Image View*/
        implementation 'de.hdodenhof:circleimageview:3.0.1'
        implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
        implementation "com.android.support:design:30.0.0"
        implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
    
    }
    
    apply plugin: 'com.google.gms.google-services'
    

提交回复
热议问题