Android Studio 没有找到类文件为com,谷歌,android,gms,内部,zzbck

np8igboo  于 2022-11-16  发布在  Android
关注(0)|答案(3)|浏览(134)

我想在我的应用程序中实现Firebase。
Firebase只是用于重置密码。
我有这个问题,我不知道如何解决。
错误:无法访问zzbck
没有找到类文件为com。谷歌。android。gms。内部。zzbck
这是我的身材

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    classpath 'com.google.gms:google-services:4.0.0'

}
}

allprojects {
repositories {
    google()
    jcenter()
    maven{
        url "https://maven.google.com"
    }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

下面是应用程序构建.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example.user_pc.glavnastranicaprojekat"
    minSdkVersion 15
    targetSdkVersion 27
    multiDexEnabled = true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.android.support:multidex:1.0.3'
androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'

implementation 'com.google.android.gms:play-services:11.4.0'

implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.bignerdranch.android:expandablerecyclerview:1.0.3'

implementation 'com.android.support:design:27.1.0'

implementation 'com.basgeekball:awesome-validation:1.3'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'


}
apply plugin: 'com.google.gms.google-services'

我希望有人能解决这个问题

bfrts1fy

bfrts1fy1#

如果你想使用Google Play服务库,那么不要使用play-services组合目标。
注意:不要使用组合的播放服务目标。它会引入许多库,使应用膨胀。相反,只指定应用使用的特定Google Play服务API。
您需要使用单独的API,例如:

implementation 'com.google.android.gms:play-services-plus:15.0.1'

也可以使用最新版本,更多信息请访问:
https://developers.google.com/android/guides/setup

w51jfk4q

w51jfk4q2#

这可能有点晚了,但对于那些面临同样错误的人来说,去你的应用gradle文件,更新你的play-services-vision到最新版本。

eyh26e7m

eyh26e7m3#

我知道这对你来说会很晚
1.将google-play-service.jar下载到应用程序内的文件夹中,并将其解压缩到该文件夹中
1.在android studio中,右键单击jar文件,然后单击添加为库

相关问题