一、问题
在使用eclipse对apk进行签名打包是,console界面出现下面的异常信息,导致打包失败:
[2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-07-15 23:57:43 - MozMeet] You should check if you need to specify additional program jars. [2014-07-15 23:57:43 - MozMeet] Warning: there were 95 unresolved references to classes or interfaces. [2014-07-15 23:57:43 - MozMeet] You may need to specify additional library jars (using '-libraryjars'). [2014-07-15 23:57:43 - MozMeet] Error: Please correct the above warnings first.二、原因:取消注释proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt这行,使用混淆打包时出现的。
三、解决办法:
在proguard-project.txt混淆配置中,增加下面的代码:
-keepattributes SourceFile,LineNumberTable -keep class com.parse.*{ *; } -dontwarn com.parse.** -dontwarn com.squareup.picasso.** -keepclasseswithmembernames class * { native <methods>; }
原文地址:http://blog.csdn.net/z18789231876/article/details/41206933