Firebase通知服务导致应用程序崩溃

时间:2017-09-28 16:38:42

标签: java android firebase firebase-cloud-messaging

我已经实施了Firebase通知,它过去工作得很好但现在当我尝试发送通知时,应用程序崩溃your app unexpectedly stopped working

这是我从谷歌播放控制台获得的日志(我的代码似乎很好)

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)

我的依赖

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'
}

更改为11.4.0后错误的屏幕截图 enter image description here

1 个答案:

答案 0 :(得分:0)

将Google Maven添加到您的项目级build.gradle文件中,如下所示:

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

将您的依赖项更改为:

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'

所有最新版本依赖项的列表为here