生成签名apk的警告

时间:2017-07-28 14:21:59

标签: android apk build.gradle build-error

我正在生成已签名的apk并有这些警告。 我该怎么做才能解决这个问题?

{
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:there were 17 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
}

2 个答案:

答案 0 :(得分:0)

如果您的应用模块中minifyEnabled设置为true,您可能需要按照here所述将以下行添加到proguard-rules.pro文件中。

-dontwarn com.squareup.okhttp.**

答案 1 :(得分:0)

请在progaurd规则文件

中添加如下的-dontwarn
-dontwarn com.squareup.picasso.**