【AGC】崩溃服务flutter报缺失recordFatalException方法的问题
问题背景:
cp反馈集成AGC-崩溃服务的flutter插件,使用最新的1.3.0+300版本,出现下面错误
/Users/yin/Documents/projects/flutter/.pub-cache/hosted/pub.dartlang.org/agconnect_crash-1.3.0+300/android/src/main/java/com/huawei/agconnectcrash/AGConnectCrashPlugin.java:106: 错误: 找不到符号
AGConnectCrash.getInstance().recordFatalException(exception);
^
符号: 方法 recordFatalException(FlutterError)
位置: 类 AGConnectCrash
注: /Users/yin/Documents/projects/flutter/.pub-cache/hosted/pub.dartlang.org/agconnect_crash-1.3.0+300/android/src/main/java/com/huawei/agconnectcrash/AGConnectCrashPlugin.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
1 个错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':agconnect_crash:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 18s
Exception: Gradle task assembleDebug failed with exit code 1
Exited。
解决方案:
使用AGC-崩溃服务flutte引入的crash sdk会自动引入安卓的crash这个库。但是目前最新的flutter1.3.0中,引入的安卓的库还是1.7.1.300没有自动更新,而record这个方法是在1.7.2.300中才加入的,所以需要cp手动将版本更新到1.7.2.300或1.7.3.300.
该插件的地址在android studio中是在\flutter\.pub-cache\hosted\pub.flutter-io.cn\agconnect_crash-1.3.0+300\android\build.gradle中,其他ide应该路径也差不多,或者可以全局搜索一下。手动更新一下版本就可以了。
欲了解更多更全技术文章,欢迎访问https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh
相关文章
- 去除DataTable重复数据的三种方法(转)
- python-面向对象-09_类属性和类方法
- mysql.zip 包的简易安装方法
- win10关闭自动更新的方法
- javascript的函数、创建对象、封装、属性和方法、继承
- [Flutter] lib/main.dart:1: Warning: Interpreting this as package URI, 'package:flutter_app/main.dart'.
- 线程池中shutdown()和shutdownNow()方法的区别
- 玩转SSRS第九篇---匿名访问的一个间接方法
- Flutter原理 flutter架构、flutter UI系统、BuildContext、Widget与Element、命中测试hitTest、flutter显示流程分析
- Py之pywifi:Python库之pywifi的简介、安装、使用方法之详细攻略
- Python:python语言中与时间有关的库函数简介、安装、使用方法(获取当前时间/计算程序块前后运行时间/模型训练时间或耗费时间)之详细攻略
- Android 11.0 12.0蓝牙遥控器确认键弹不出输入法的解决方法
- Python Flask框架学习08:Flask HTTP方法
- Flutter之 flutter_after_layout组件的作用:监听页面渲染的第一帧
- Flutter Unable to ‘pub upgrade‘ flutter tool
- Flutter 开发环境搭建Unable to ‘pub upgrade‘ flutter tool. Retrying in five seconds...
- java实现甘特图的2种方法:SwiftGantt和Jfree (转)
- 封装axios请求方法2
- NOSQL之Neo4j:Neo4j的简介、安装、使用方法(Neo4j搭配JDK安装的图文教程)之详细攻略
- python工具方法 23 应用于语义分割的F1,recall,precision,iou,kappa系数的计算工具(支持ignore_index)
- Opencv 基本操作五 各种连通域处理方法
- 第十六篇:回调方法?钩子方法?模板模式?