Crashlytics升级v2.0.0+,打包报错

2024-05-09 06:18

本文主要是介绍Crashlytics升级v2.0.0+,打包报错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、升级
1.In your app’s root-level (project-level) build.gradle:

  • Replace Fabric’s Maven repository with Google’s Maven repository.
  • Replace the Fabric Gradle plugin with the Firebase Crashlytics Gradle plugin. If you’re using Android Studio 4.1 Canary, be sure to add the Crashlytics Gradle plugin version 2.0.0 or later.
buildscript {// ...repositories {// ...// Remove Fabric's Maven repository.// maven { url 'https://maven.fabric.io/public' }// Add Google's Maven repository (if it's not there already).google()}dependencies {// ..// Add the Google Services Gradle plugin (if it's not there already).classpath 'com.google.gms:google-services:4.3.4'// Remove the Fabric Gradle plugin.// classpath 'io.fabric.tools:gradle:1.31.2'// Add the Crashlytics Gradle plugin (use v2.0.0+ if you built// your app with Android Studio 4.1).classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'}
}

2.In your app-level build.gradle, replace the Fabric plugin with the Firebase Crashlytics plugin:

apply plugin: 'com.android.application'// Apply the Google Services plugin (if it's not there already).
apply plugin: 'com.google.gms.google-services'// Remove the Fabric plugin.
// apply plugin: 'io.fabric'// Add the Firebase Crashlytics plugin.
apply plugin: 'com.google.firebase.crashlytics'

3.Finally, add the Firebase Crashlytics SDK. In your app-level build.gradle, replace the legacy Fabric Crashlytics SDK with the new Firebase Crashlytics SDK. Make sure you add version 17.0.0 or later (beginning November 15, 2020, this is required for your crash reports to appear in the Firebase console).

Recommended: For an optimal experience with Firebase Crashlytics, we recommend also adding the Firebase SDK for Google Analytics to your app (make sure to add Version 17.2.3 or later in order to get real time crash-free users and breadcrumbs).

dependencies {// Remove the Fabric Crashlytics SDK.// implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' // Add the Firebase Crashlytics SDK.implementation 'com.google.firebase:firebase-crashlytics:17.3.0'// Recommended: Add the Google Analytics SDK.implementation 'com.google.firebase:firebase-analytics:18.0.0'
}

官网:https://firebase.google.cn/docs/crashlytics/upgrade-sdk?platform=android

二、打包报错
Execution failed for task ‘:app:uploadCrashlyticsMappingFileRelease’.
org.apache.http.conn.HttpHostConnectException: Connect to firebasecrashlyticssymbols.googleapis.com:443 [firebasecrashlyticssymbols.googleapis.com/216.58.200.42] failed: Connection timed out: connect

科学上网后,在gradle.properties中添加:

systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=xxxx // 端口

这篇关于Crashlytics升级v2.0.0+,打包报错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/972614

相关文章

qt5cored.dll报错怎么解决? 电脑qt5cored.dll文件丢失修复技巧

《qt5cored.dll报错怎么解决?电脑qt5cored.dll文件丢失修复技巧》在进行软件安装或运行程序时,有时会遇到由于找不到qt5core.dll,无法继续执行代码,这个问题可能是由于该文... 遇到qt5cored.dll文件错误时,可能会导致基于 Qt 开发的应用程序无法正常运行或启动。这种错

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

苹果macOS 26 Tahoe主题功能大升级:可定制图标/高亮文本/文件夹颜色

《苹果macOS26Tahoe主题功能大升级:可定制图标/高亮文本/文件夹颜色》在整体系统设计方面,macOS26采用了全新的玻璃质感视觉风格,应用于Dock栏、应用图标以及桌面小部件等多个界面... 科技媒体 MACRumors 昨日(6 月 13 日)发布博文,报道称在 macOS 26 Tahoe 中

华为鸿蒙HarmonyOS 5.1官宣7月开启升级! 首批支持名单公布

《华为鸿蒙HarmonyOS5.1官宣7月开启升级!首批支持名单公布》在刚刚结束的华为Pura80系列及全场景新品发布会上,除了众多新品的发布,还有一个消息也点燃了所有鸿蒙用户的期待,那就是Ha... 在今日的华为 Pura 80 系列及全场景新品发布会上,华为宣布鸿蒙 HarmonyOS 5.1 将于 7

Python程序打包exe,单文件和多文件方式

《Python程序打包exe,单文件和多文件方式》:本文主要介绍Python程序打包exe,单文件和多文件方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录python 脚本打成exe文件安装Pyinstaller准备一个ico图标打包方式一(适用于文件较少的程

MySQL启动报错:InnoDB表空间丢失问题及解决方法

《MySQL启动报错:InnoDB表空间丢失问题及解决方法》在启动MySQL时,遇到了InnoDB:Tablespace5975wasnotfound,该错误表明MySQL在启动过程中无法找到指定的s... 目录mysql 启动报错:InnoDB 表空间丢失问题及解决方法错误分析解决方案1. 启用 inno

Maven项目打包时添加本地Jar包的操作步骤

《Maven项目打包时添加本地Jar包的操作步骤》在Maven项目开发中,我们经常会遇到需要引入本地Jar包的场景,比如使用未发布到中央仓库的第三方库或者处理版本冲突的依赖项,本文将详细介绍如何通过M... 目录一、适用场景说明​二、核心操作命令​1. 命令格式解析​2. 实战案例演示​三、项目配置步骤​1

解决Java异常报错:java.nio.channels.UnresolvedAddressException问题

《解决Java异常报错:java.nio.channels.UnresolvedAddressException问题》:本文主要介绍解决Java异常报错:java.nio.channels.Unr... 目录异常含义可能出现的场景1. 错误的 IP 地址格式2. DNS 解析失败3. 未初始化的地址对象解决

Python报错ModuleNotFoundError的10种解决方案

《Python报错ModuleNotFoundError的10种解决方案》在Python开发中,ModuleNotFoundError是最常见的运行时错误之一,通常由模块路径配置错误、依赖缺失或命名冲... 目录一、常见错误场景与原因分析二、10种解决方案与代码示例1. 检查并安装缺失模块2. 动态添加模块

Spring Boot项目打包和运行的操作方法

《SpringBoot项目打包和运行的操作方法》SpringBoot应用内嵌了Web服务器,所以基于SpringBoot开发的web应用也可以独立运行,无须部署到其他Web服务器中,下面以打包dem... 目录一、打包为JAR包并运行1.打包为可执行的 JAR 包2.运行 JAR 包二、打包为WAR包并运行