Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ProGuard Cannot Find Referenced Libraries

[2014-07-15 23:57:43 - MozMeet] Proguard returned with error code 1. See console [2014-07-15 23:57:43 - MozMeet] Note: there were 662 duplicate class definitions. [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find superclass or interface com.facebook.android.Facebook$ServiceListener [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find superclass or interface com.facebook.Session$StatusCallback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find superclass or interface com.facebook.Request$Callback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SharedPreferencesTokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SharedPreferencesTokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook$ServiceListener [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$StatusCallback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionDefaultAudience [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.Facebook$ServiceListener [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.FacebookError [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.FacebookError [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session$StatusCallback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request$Callback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.FacebookRequestError [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.model.GraphObject [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Request$Callback [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.FacebookRequestError [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.model.GraphObject [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Request [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session [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.   

This is the list of errors that I get when I try to export my Android app with ProGuard enabled. A little bit of Googling and I found that I need to add jar files to the proguard-project.txt. So far what I have added looks like this (but to no avail):

-keepattributes SourceFile,LineNumberTable -keep class com.parse.*{ *; } -libraryjars \libs\Parse-1.5.1.jar -keepclasseswithmembernames class * {     native <methods>; }   

I also have 3 more libraries along with Parse namely Crashlytics, Picasso and V4 Support.

like image 439
An SO User Avatar asked Jul 15 '14 18:07

An SO User


1 Answers

Made a few changes to proguard-project.txt file (if you have more than one module in your project - put it in the module which calls the *.jar file you are getting warned about):

-keepattributes SourceFile,LineNumberTable -keep class com.parse.*{ *; } -dontwarn com.parse.** -dontwarn com.squareup.picasso.** -keepclasseswithmembernames class * {     native <methods>; }   

The -dontwarn lines were needed. Basically what they tell ProGuard is that these jars work fine on their own so don't complain when you cannot find the classes they reference.

like image 91
An SO User Avatar answered Sep 19 '22 20:09

An SO User