相关疑难解决方法(0)

无法访问zzbfm类文件zzbfm找不到,firebase,android?

我在我的应用程序中集成了播放服务和firebase.当我运行应用程序时,我收到此错误

cannot access zzbfm
class file for com.google.android.gms.internal.zzbfm not found
Run Code Online (Sandbox Code Playgroud)

这是我的顶级gradle

buildscript {

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


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:4.0.1'
}
}

allprojects {
repositories {
    google()
    jcenter()
}
tasks.withType(JavaCompile) { options.deprecation = true }
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

这是我的app级gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
    applicationId "ima.rvtech"
    minSdkVersion 23
    targetSdkVersion …
Run Code Online (Sandbox Code Playgroud)

android firebase google-play-services firebase-cloud-messaging

7
推荐指数
1
解决办法
6095
查看次数

Android | 无法为版本15.0.1添加所有Google库

我正在学习Android,同时做一些工作.我正在尝试将应用程序的版本更新为Android 8.0,其中包括使用的sdk,库和外部API.

查了一下,似乎15.0.1是建议的版本.但是当我使用它时,gradle失败play-services-analytics并且firebase服务同步说它无法解析库,如果按下Install Repository也无法找到存储库.

错误示例

所以目前我正在使用12.0.1版本来播放服务和firebase服务.使用它像:

implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-analytics:12.0.1'
implementation 'com.google.firebase:firebase-crash:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
Run Code Online (Sandbox Code Playgroud)

但是,如果我尝试仅使用play-services除分析之外的15.0.1,那么它会给我另一个警告,即使用不同版本的播放服务和firebase服务可能会导致运行时崩溃.

在此输入图像描述

所以它让我处于一个奇怪的境地,我用Google搜索和搜索,但无法找到任何对我有用的东西......在这里处理这个问题的正确方法是什么?我应该满足于12.0.1吗?或更新有用的东西?(之前的版本是9.4.0或类似的东西;在我进行Android 8.0升级之前)

编辑:这些是我的顶级gradle依赖项

classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'
Run Code Online (Sandbox Code Playgroud)

android google-maps firebase android-gradle-plugin

2
推荐指数
1
解决办法
1388
查看次数