【问题标题】:Cannot use Picasso and retrofit together不能同时使用毕加索和改装
【发布时间】:2017-08-22 19:13:58
【问题描述】:

我在我的应用程序中同时使用PicassoRetrofit。一切都在debug 版本中完美运行,但是每当我尝试生成签名的apk 时,我都会得到类似Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' 的内容

我搜索了一会儿,尝试在proguard-rules.pro中使用-dontwarn retrofit.*

这行不通

【问题讨论】:

  • 请编辑您的问题并发布整个 Gradle 控制台输出,而不仅仅是一行。最有可能的是,输出中的真正问题似乎比这一行更高。
  • Gradle 控制台输出?
  • 在 Android Studio 中,Gradle 控制台工具默认停靠在底部,向右。这是构建过程的完整文本输出。

标签: android retrofit proguard picasso


【解决方案1】:

Picassoproguard 配置

-dontwarn com.squareup.okhttp.**

Retrofitproguard 配置

-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

-keepclasseswithmembers class * {
    @retrofit2.http.* <methods>;
}

【讨论】:

    猜你喜欢
    • 2016-06-18
    • 2016-07-08
    • 2019-03-21
    • 2015-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    相关资源
    最近更新 更多