实施Google Firebase后,Android应用会冻结 [英] Android App freezes after implementing Google Firebase

查看:120
本文介绍了实施Google Firebase后,Android应用会冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的build.gradle

pre $ $ $ $ $编译fileTree(dir:'libs',include: ['* .jar'])
testCompile'junit:junit:4.12'
compile'c​​om.android.support:appcompat-v7:23.4.0'
compile'c​​om.android。 support:design:23.4.0'
compile'c​​om.android.support:cardview-v7:23.4.0'
compile'c​​om.android.support:support-v4:23.4.0'
compile'c​​om.github.castorflex.smoothprogressbar:library:1.1.0'
compile'c​​om.google.android.gms:play-services:9.0.2'
compile'c​​om.google。 firebase-core:9.0.2'
compile'c​​om.google.firebase:firebase-analytics:9.0.2'
compile'c​​om.google.firebase:firebase-ads:9.0.2'
compile'c​​om.google.firebase:firebase-crash:9.0.2'
compile'c​​om.google.firebase:firebase-messaging:9.0.2'
}
apply插件:'com.google.gms.google-services'

应用程序冻结当应用程序恢复。它会给出anr(activity not responding)错误。

播放服务9.0+还是有firebase有问题? h2_lin>解决方案

我解决了这个问题,通过删除行

  compile'c​​om。 google.android.gms:play-services:9.0.2'


Here is my build.gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.firebase:firebase-core:9.0.2'
    compile 'com.google.firebase:firebase-analytics:9.0.2'
    compile 'com.google.firebase:firebase-ads:9.0.2'
    compile 'com.google.firebase:firebase-crash:9.0.2'
    compile 'com.google.firebase:firebase-messaging:9.0.2'
}
apply plugin: 'com.google.gms.google-services'

app freezes when the app resumes. it gives anr (activity not responding) error.

is there any problem with play services 9.0+ or with firebase ?

解决方案

I was solved the issue by removing the line

compile 'com.google.android.gms:play-services:9.0.2'

这篇关于实施Google Firebase后,Android应用会冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆