简体   繁体   English

Firebase通知服务导致应用崩溃

[英]Firebase notifications service is causing the app to crash

I have implemented Firebase notifications and it used to work just fine but now when I try to send a notification the app crash with your app unexpectedly stopped working 我已经实现了Firebase通知,它过去可以正常工作,但是现在当我尝试发送通知时,应用崩溃导致your app unexpectedly stopped working

This is the log I got from google play console (my code seems fine) 这是我从Google Play控制台获得的日志(我的代码似乎正常)

java.lang.AbstractMethodError: 
  at com.google.firebase.iid.zzb$1.run (Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
  at java.lang.Thread.run (Thread.java:818)

My dependencies 我的依赖

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.github.javiersantos:AppUpdater:2.6.3' 
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.google.android.gms:play-services-ads:10.2.4'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.simplecityapps:recyclerview-fastscroll:1.0.11'
compile 'com.nshmura:snappysmoothscroller:1.0.0'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-analytics:10.2.4'
compile 'com.github.loregr:lgsnackbar:1.0.2'
testCompile 'junit:junit:4.12'
}

Screenshot of the error after changing to 11.4.0 更改为11.4.0后错误的屏幕截图 在此处输入图片说明

Add Google Maven to your project level build.gradle file like this: 像这样将Google Maven添加到您的项目级别的build.gradle文件中:

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

Change your dependencies to this: 将您的依赖项更改为此:

ompile 'com.google.android.gms:play-services-ads:11.4.0'
compile 'com.google.firebase:firebase-core:11.4.0'
compile 'com.google.firebase:firebase-messaging:11.4.0'
compile 'com.google.android.gms:play-services-analytics:11.4.0'

The list of all the latest version dependencies is here 所有最新版本依赖项的列表在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM