gpt4 book ai didi

android - dagger android支持proguard规则

转载 作者:IT老高 更新时间:2023-10-28 23:18:17 24 4
gpt4 key购买 nike

我正在使用带有 ProguardDagger2 android-support 库,但由于此错误,我无法编译我的项目:

Warning:dagger.android.AndroidInjector: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.AndroidInjector$Builder: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.AndroidInjector$Factory: can't find referenced class com.google.errorprone.annotations.DoNotMock
Warning:dagger.android.DaggerApplication: can't find referenced class com.google.errorprone.annotations.ForOverride
Warning:dagger.android.DispatchingAndroidInjector: can't find referenced class com.google.errorprone.annotations.CanIgnoreReturnValue
Warning:there were 5 unresolved references to classes or interfaces.

我使用的 Dagger 版本是 2.11 .

问题是我应该为 Dagger2 android-support 库使用什么 Proguard 规则?

最佳答案

应该是:

-keep class com.google.errorprone.annotations.** { *; }

更新:大概只有​​下面的规则就够了,不需要添加前面的规则。

-dontwarn com.google.errorprone.annotations.**

关于android - dagger android支持proguard规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45908252/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com