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

相关文章

电脑找不到mfc90u.dll文件怎么办? 系统报错mfc90u.dll丢失修复的5种方案

《电脑找不到mfc90u.dll文件怎么办?系统报错mfc90u.dll丢失修复的5种方案》在我们日常使用电脑的过程中,可能会遇到一些软件或系统错误,其中之一就是mfc90u.dll丢失,那么,mf... 在大部分情况下出现我们运行或安装软件,游戏出现提示丢失某些DLL文件或OCX文件的原因可能是原始安装包

电脑显示mfc100u.dll丢失怎么办?系统报错mfc90u.dll丢失5种修复方案

《电脑显示mfc100u.dll丢失怎么办?系统报错mfc90u.dll丢失5种修复方案》最近有不少兄弟反映,电脑突然弹出“mfc100u.dll已加载,但找不到入口点”的错误提示,导致一些程序无法正... 在计算机使用过程中,我们经常会遇到一些错误提示,其中最常见的就是“找不到指定的模块”或“缺少某个DL

解决IDEA报错:编码GBK的不可映射字符问题

《解决IDEA报错:编码GBK的不可映射字符问题》:本文主要介绍解决IDEA报错:编码GBK的不可映射字符问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录IDEA报错:编码GBK的不可映射字符终端软件问题描述原因分析解决方案方法1:将命令改为方法2:右下jav

MyBatis模糊查询报错:ParserException: not supported.pos 问题解决

《MyBatis模糊查询报错:ParserException:notsupported.pos问题解决》本文主要介绍了MyBatis模糊查询报错:ParserException:notsuppo... 目录问题描述问题根源错误SQL解析逻辑深层原因分析三种解决方案方案一:使用CONCAT函数(推荐)方案二:

Spring Boot中JSON数值溢出问题从报错到优雅解决办法

《SpringBoot中JSON数值溢出问题从报错到优雅解决办法》:本文主要介绍SpringBoot中JSON数值溢出问题从报错到优雅的解决办法,通过修改字段类型为Long、添加全局异常处理和... 目录一、问题背景:为什么我的接口突然报错了?二、为什么会发生这个错误?1. Java 数据类型的“容量”限制

SpringBoot项目中报错The field screenShot exceeds its maximum permitted size of 1048576 bytes.的问题及解决

《SpringBoot项目中报错ThefieldscreenShotexceedsitsmaximumpermittedsizeof1048576bytes.的问题及解决》这篇文章... 目录项目场景问题描述原因分析解决方案总结项目场景javascript提示:项目相关背景:项目场景:基于Spring

将Java程序打包成EXE文件的实现方式

《将Java程序打包成EXE文件的实现方式》:本文主要介绍将Java程序打包成EXE文件的实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录如何将Java程序编程打包成EXE文件1.准备Java程序2.生成JAR包3.选择并安装打包工具4.配置Launch4

PyInstaller打包selenium-wire过程中常见问题和解决指南

《PyInstaller打包selenium-wire过程中常见问题和解决指南》常用的打包工具PyInstaller能将Python项目打包成单个可执行文件,但也会因为兼容性问题和路径管理而出现各种运... 目录前言1. 背景2. 可能遇到的问题概述3. PyInstaller 打包步骤及参数配置4. 依赖

解决SpringBoot启动报错:Failed to load property source from location 'classpath:/application.yml'

《解决SpringBoot启动报错:Failedtoloadpropertysourcefromlocationclasspath:/application.yml问题》这篇文章主要介绍... 目录在启动SpringBoot项目时报如下错误原因可能是1.yml中语法错误2.yml文件格式是GBK总结在启动S

idea maven编译报错Java heap space的解决方法

《ideamaven编译报错Javaheapspace的解决方法》这篇文章主要为大家详细介绍了ideamaven编译报错Javaheapspace的相关解决方法,文中的示例代码讲解详细,感兴趣的... 目录1.增加 Maven 编译的堆内存2. 增加 IntelliJ IDEA 的堆内存3. 优化 Mave