class file for com.google.android.gms.internal.zzbgl not found

前端 未结 1 773
暖寄归人
暖寄归人 2021-01-22 07:06
  • implementation \'com.google.firebase:firebase-core:16.0.0\'
  • implementation \'com.google.firebase:firebase-invites:16.0.0\'
  • implementation \'com.google.fi
相关标签:
1条回答
  • 2021-01-22 07:57

    Are you importing google services in your build.gradle(root level)?

    build.gradle root level

    buildscript {
        // ...
        dependencies {
            // ...
            classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
        }
    }
    
    allprojects {
        // ...
        repositories {
            // ...
            google() // Google's Maven repository
        }
    }
    

    build.gradle app level

    apply plugin: 'com.android.application'
    
    android {
      // ...
    }
    
    dependencies {
      implementation 'com.google.android.gms:play-services:12.0.1'
      // ...
      implementation 'com.google.firebase:firebase-core:16.0.1'
      implementation 'com.google.firebase:firebase-invites:16.0.1'
      implementation 'com.google.firebase:firebase-storage:16.0.1'
      implementation 'com.google.firebase:firebase-auth:16.0.1'
      implementation 'com.google.firebase:firebase-crash:16.0.1'
    
      // Getting a "Could not find" error? Make sure you have
      // added the Google maven respository to your root build.gradle
    }
    
    // ADD THIS AT THE BOTTOM
    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
提交回复
热议问题