【发布时间】:2016-06-06 14:28:24
【问题描述】:
这是我的 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'
应用程序在恢复时冻结。它给出了 anr(活动没有响应)错误。
play services 9.0+ 或 firebase 有什么问题吗?
【问题讨论】:
-
你的应用程序在哪里冻结,你的 anr 日志在哪里?
-
当我从最小化状态回到应用程序时,例如前。我在正在运行的应用程序上按主页按钮,然后返回应用程序,然后应用程序冻结,几秒钟后它给出了 anr。
-
我在日志中看到了类似的问题:D/FirebaseApp: Notifying background state change listeners。
-
Parte Patel,你有 logcat 的副本吗,你使用的是 Android Studio 的版本。
-
只是为了补充一点,得到同样的问题,使用相同的 firebase 模块。我的经验是该应用程序在后台运行之前运行良好,有时它第一次返回正常,但从不超过一次,第二次它挂起,看起来 UI 线程被锁定。这是最近一次崩溃中的ANR log。此外,使用 Android Studio 2.2 Preview 2。Logcat 仅显示上面提到的调试消息@Innova 没有错误
标签: android firebase google-play-services