android - 在android中添加truetime库时出现错误
问题描述
我已经添加了用于获取网络时间的 truetime 库,但是我遇到了一个错误,我无法在 android 中解决它。
图书馆:
implementation 'com.github.instacart.truetime-android:library-extension-rx:2.0'
错误:安卓问题:
InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored.
Message{kind=WARNING, text=InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored., sources=[Unknown source file], tool name=Optional.of(D8)}
Java 编译器:
The rule `-keep public class *extends java.lang.annotation.Annotation {
我尝试了很多,但它无法解决它。
请任何人解决这个问题。将不胜感激。
提前致谢。
解决方案
请在此处查看答案。
为了您的方便,我也在这里提供答案:
解决方案1:
尝试将您的更新gradle
到最新版本。
解决方案2:
在 proguard 规则上添加这行代码
-keepattributes *Annotation*
-keep @**annotation** class * {*;}
推荐阅读
- c - 来自不兼容指针类型的警告初始化 - C 函数指针数组
- r - R中的盒子计数
- python - 如何将自签名证书添加到 PyCharm?
- react-native - 滚动视图不会触发任何滚动事件
- postgresql - 如何从 pg_ddl_command 获取 sql 查询
- elasticsearch - 从 Istio 为 HTTP 服务生成证书
- javascript - 带有ajax调用的Javascript异步循环
- c++ - BigInt 乘法和减法错误
- r - 如何使用 R 中“factoextra”包中的 fviz_dend 函数更改树状图的标签?
- java - spring data jpa - 基于接口的投影中的自定义类型转换