【问题标题】:Building apk successful but crashes on devices and emulator构建 apk 成功但在设备和模拟器上崩溃
【发布时间】:2019-04-07 11:55:13
【问题描述】:

我正在从这个implementation 'com.android.support:appcompat-v7:28.0.0' 转移一个新问题 因为我通过答案解决了我的问题,但现在我的应用程序不断崩溃。

会发生这种情况:我构建了我的 apk,我将它发送到模拟器和我的设备(galaxy a6+),我得到一个“程序已关闭”(不知道术语在技术上是否正确,安装成功后,我正在翻译意大利语)消息。在 Galaxy s5 上,消息是“数据分析期间出错”并且永远无法安装它。

这是我在更改后的 build.gradle,感谢本网站上的答案:https://www.dropbox.com/sh/1vjmrh196bdy5gn/AADW-DG1YB10s-Csw_UrZtuYa?dl=0

感谢您提供任何线索。

【问题讨论】:

    标签: android-studio android-emulator apk


    【解决方案1】:

    我遇到了和你一样的问题,从上一个问题开始关注你。

    我找到了解决方案: 使用前先初始化firebase的实例,加入以下行:

    FirebaseApp.initializeApp(this); 
    

    在获取 Firebase 实例之前。

    然后在 build.gradle 中更改依赖
    类路径 'com.google.gms:google-services:4.1.0' 到 类路径 'com.google.gms:google-services:4.0.0'

    google-services:4.1.0 好像有问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-12
      相关资源
      最近更新 更多