Спас мой день. Спасибо

егрировал сервисы Play и Firebase в свое приложение. Когда я запускаю приложение, я получаю эту ошибку

cannot access zzbfm
class file for com.google.android.gms.internal.zzbfm not found

Это мой высший уровень 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
}

Это мой уровень приложения Gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
    applicationId "ima.rvtech"
    minSdkVersion 23
    targetSdkVersion 27
    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.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.dagger:dagger:2.16'
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.balsikandar.android:crashreporter:1.0.9'
implementation "android.arch.persistence.room:runtime:1.0.0"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
}

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

Я получаю сообщение об ошибке, указываемое в классе MessageService, когда я пытаюсь получить постоянное удаленное сообщение

public class FCMMessageService extends FirebaseMessagingService {

@Override
public void onMessageReceived(RemoteMessage message) {
    sendMyNotification(message.getNotification().getBody());
}


private void sendMyNotification(String message) {

    //On click of notification it redirect to this Activity
    Intent intent = new Intent(this, ActivityHome.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);

    Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this,"x")
            .setSmallIcon(R.mipmap.ic_launcher)
            .setContentTitle("My Firebase Push notification")
            .setContentText(message)
            .setAutoCancel(true)
            .setSound(soundUri)
            .setContentIntent(pendingIntent);

    NotificationManager notificationManager =
            (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

    notificationManager.notify(0, notificationBuilder.build());
}
}

Уже проверил решения, упомянутые по другим вопросам, но ни один из этих ответов не сработал.

Любое решение?

Ответы на вопрос(1)

Ваш ответ на вопрос