问题描述
我正在从这个实现'com.android.支持:AppCompat-V7:28.0.0' 因为我通过答案解决了我的问题,但现在我的应用程序不断崩溃.
这就是发生的事情:我建立我的APK,我将它发送给仿真器并向我的设备(Galaxy A6 +)并获得"程序已被关闭"(不知道条款是否在技术上是正确的,安装成功后,我从意大利语翻译了.在Galaxy S5上,该消息是"数据分析期间的错误",永远不会安装它.
这是我的build.gradle在这个网站上的答案发出的变化后: https://www.dropbox.com/sh/1vjmrh196bdy5gn/aadw-dg1yb10s-csw_urztuya?dl=0
谢谢任何线索.
推荐答案
我与您的问题相同,并从上一个问题跟随您.
我找到了一个解决方案: 首先通过添加该行之前首先初始化Firebase的实例:
FirebaseApp.initializeApp(this);
在获得Firebase实例之前.
然后在build.gradle更改依赖项
ClassPath'com.google.gms:Google-Services:4.1.0'
到
ClassPath'com.google.gms:Google-Services:4.0.0'
似乎谷歌服务:4.1.0有一个问题
问题描述
I am moving a new question from this one implementation 'com.android.support:appcompat-v7:28.0.0' because I solved my problem thanks to the answers but now my app is continuously crashing.
This is what happens: I build my apk, I send it to the emulator and to my device (galaxy a6+) and I get a "The program has been shut down" (don't know if terms are technically correct, I am translating from Italian) message after installing successfully. On a galaxy s5 the message is "error during data analysis" and never get to install it.
This is my build.gradle after the changes made thanks to the answers on this site : https://www.dropbox.com/sh/1vjmrh196bdy5gn/AADW-DG1YB10s-Csw_UrZtuYa?dl=0
Thank you for any clue.
推荐答案
I was having the same problem as you and am following you from the previous question.
I have found a solution: First initialize the instance of firebase before using it by adding the line:
FirebaseApp.initializeApp(this);
before getting an instance of Firebase.
Then in build.gradle change the dependency
classpath 'com.google.gms:google-services:4.1.0'
to
classpath 'com.google.gms:google-services:4.0.0'
It seems that google-services:4.1.0 has an issue