Ric*_*ral 10 android google-cloud-messaging google-play-services
我知道这个问题,但我不认为这有助于我,问题看起来略有不同.
我正在使用此应用程序,我需要实施AppsFlyer进行跟踪,并且我只需要使用Google Play服务中的2个组件:
com.google.android.gms:播放服务的广告
com.google.android.gms:播放服务-GCM
我正在使用最新版本的Google Play服务,即9.0.2.
问题是在安装应用程序后的第一个应用程序启动时,该应用程序需要相当多的时间来启动.没有日志输出,当应用程序开始执行某些操作时,日志的第一行是:
06-16 16:50:23.782 22368-22368/com.company.app I/FirebaseInitProvider:FirebaseApp初始化失败
我没有使用Firebase,我怎么能摆脱这个?它确实减慢了应用程序初始化的速度.用户体验不是很好......
编辑:
我已经添加了两个库,一次一个,我意识到GCM是导致问题的那个.当我添加:
com.google.android.gms:播放服务-GCM
我开始收到"FirebaseApp初始化失败"日志,应用程序需要一段时间才能启动.也许降级"修复"了这个问题,但这不是一个很好的解决方案.
Hen*_*usa 14
我建议您firebase使用gradle以下方法排除该组:
compile('com.google.android.gms:play-services-ads:9.0.2') {
exclude group: 'com.google.firebase', module: 'firebase-common'
}
compile('com.google.android.gms:play-services-gcm:9.0.2') {
exclude group: 'com.google.firebase', module: 'firebase-common'
}
Run Code Online (Sandbox Code Playgroud)
或者,只需应用全局排除配置,如下所示:
configurations {
all*.exclude group: 'com.google.firebase', module: 'firebase-common'
}
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你 :)
| 归档时间: |
|
| 查看次数: |
6910 次 |
| 最近记录: |