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

相关文章

解决idea启动项目报错java: OutOfMemoryError: insufficient memory

《解决idea启动项目报错java:OutOfMemoryError:insufficientmemory》:本文主要介绍解决idea启动项目报错java:OutOfMemoryError... 目录原因:解决:总结 原因:在Java中遇到OutOfMemoryError: insufficient me

python项目打包成docker容器镜像的两种方法实现

《python项目打包成docker容器镜像的两种方法实现》本文介绍两种将Python项目打包为Docker镜像的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要... 目录简单版:(一次成功,后续下载对应的软件依赖)第一步:肯定是构建dockerfile,如下:第二步

精准寻车+鸿蒙有礼特别版均已上线! 华为鸿蒙HarmonyOS 6负一屏新升级

《精准寻车+鸿蒙有礼特别版均已上线!华为鸿蒙HarmonyOS6负一屏新升级》不少朋友升级华为鸿蒙HarmonyOS6后,发现华为负一屏此次也新增了精准寻车功能,还为过往鸿蒙5.1及以上用户再度... 最近科技圈热议话题当属华为全新发布的Mate 80系列,这次不仅有全金属机身,第二代红枫影像和全新麒麟新品

idea突然报错Malformed \uxxxx encoding问题及解决

《idea突然报错Malformeduxxxxencoding问题及解决》Maven项目在切换Git分支时报错,提示project元素为描述符根元素,解决方法:删除Maven仓库中的resolv... 目www.chinasem.cn录问题解决方式总结问题idea 上的 maven China编程项目突然报错,是

Python打包成exe常用的四种方法小结

《Python打包成exe常用的四种方法小结》本文主要介绍了Python打包成exe常用的四种方法,包括PyInstaller、cx_Freeze、Py2exe、Nuitka,文中通过示例代码介绍的非... 目录一.PyInstaller11.安装:2. PyInstaller常用参数下面是pyinstal

nodejs打包作为公共包使用的完整流程

《nodejs打包作为公共包使用的完整流程》在Node.js项目中,打包和部署是发布应用的关键步骤,:本文主要介绍nodejs打包作为公共包使用的相关资料,文中通过代码介绍的非常详细,需要的朋友可... 目录前言一、前置准备二、创建与编码三、一键构建四、本地“白嫖”测试(可选)五、发布公共包六、常见踩坑提醒

linux查找java项目日志查找报错信息方式

《linux查找java项目日志查找报错信息方式》日志查找定位步骤:进入项目,用tail-f实时跟踪日志,tail-n1000查看末尾1000行,grep搜索关键词或时间,vim内精准查找并高亮定位,... 目录日志查找定位在当前文件里找到报错消息总结日志查找定位1.cd 进入项目2.正常日志 和错误日

Vite 打包目录结构自定义配置小结

《Vite打包目录结构自定义配置小结》在Vite工程开发中,默认打包后的dist目录资源常集中在asset目录下,不利于资源管理,本文基于Rollup配置原理,本文就来介绍一下通过Vite配置自定义... 目录一、实现原理二、具体配置步骤1. 基础配置文件2. 配置说明(1)js 资源分离(2)非 JS 资

Debian 13升级后网络转发等功能异常怎么办? 并非错误而是管理机制变更

《Debian13升级后网络转发等功能异常怎么办?并非错误而是管理机制变更》很多朋友反馈,更新到Debian13后网络转发等功能异常,这并非BUG而是Debian13Trixie调整... 日前 Debian 13 Trixie 发布后已经有众多网友升级到新版本,只不过升级后发现某些功能存在异常,例如网络转

Ubuntu如何升级Python版本

《Ubuntu如何升级Python版本》Ubuntu22.04Docker中,安装Python3.11后,使用update-alternatives设置为默认版本,最后用python3-V验证... 目China编程录问题描述前提环境解决方法总结问题描述Ubuntu22.04系统自带python3.10,想升级