Не удалось настроить Proguard для извлечения APK

Я продолжаю получать сообщение об ошибке (намного ниже) при запуске ProGuard в моем приложении. У меня есть внешние файлы библиотеки в моем приложении.

Это мой proguard-android.txt

  # This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose # Optimization is turned off by default. Dex does not like code run # through the ProGuard optimize and preverify steps (and performs some # of these optimizations on its own). -dontoptimize -dontpreverify # Note that if you want to enable optimization, you cannot just # include optimization flags in your own project configuration file; # instead you will need to point to the # "proguard-android-optimize.txt" file instead of this one from your # project.properties file. -keepattributes *Annotation* -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native -keepclasseswithmembernames class * { native <methods>; } # keep setters in Views so that animations can still work. # see http://proguard.sourceforge.net/manual/examples.html#beans -keepclassmembers public class * extends android.view.View { void set*(***); *** get*(); } # We want to keep methods in Activity that could be used in the XML attribute onClick -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keepclassmembers class **.R$* { public static <fields>; } -keep class javax.** { *; } -keep class org.** { *; } -keep class com.squareup.** { *; } # The support library contains references to newer platform versions. # Don't warn about those in case this app is linking against an older # platform version. We know about them, and they are safe. -dontwarn android.support.** -dontwarn javax.management.** -dontwarn java.lang.management.** -dontwarn org.apache.log4j.** -dontwarn org.apache.commons.logging.** -dontwarn org.slf4j.** -dontwarn org.json.* -dontwarn com.squareup.okhttp.OkHttpClient.* 

Сообщение об ошибке Logcat:

  [2014-08-26 18:25:15 - Scootr] Proguard returned with error code 1. See console [2014-08-26 18:25:15 - Scootr] Note: there were 1 duplicate class definitions. [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextListener [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent [2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent [2014-08-26 18:25:15 - Scootr] You should check if you need to specify additional program jars. [2014-08-26 18:25:15 - Scootr] Warning: there were 87 unresolved references to classes or interfaces. [2014-08-26 18:25:15 - Scootr] You may need to specify additional library jars (using '-libraryjars'). [2014-08-26 18:25:15 - Scootr] java.io.IOException: Please correct the above warnings first. [2014-08-26 18:25:15 - Scootr] at proguard.Initializer.execute(Initializer.java:321) [2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.initialize(ProGuard.java:211) [2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.execute(ProGuard.java:86) [2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.main(ProGuard.java:492) 

Добавьте это в свой proguard.cfg:

  #### -- Picasso -- -dontwarn com.squareup.picasso.** #### -- OkHttp -- -dontwarn com.squareup.okhttp.internal.** #### -- Apache Commons -- -dontwarn org.apache.commons.logging.** 

You line -dontwarn com.squareup.okhttp.OkHttpClient.* Не коррелирует с Warning: com.squareup.picasso.OkHttpDownloader .

Возможно, вы попробуете изменить имя пакета в proguard.cfg

Добавлено: Попробуйте добавить в proguard.cfg

 -dontwarn -injars bin/classes -injars libs -outjars bin/classes-processed.jar -optimizationpasses 5 -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -dump class_files.txt -printseeds seeds.txt -printusage unused.txt -printmapping mapping.txt -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -allowaccessmodification -repackageclasses '' -keepattributes Signature 

Я понимаю файл proguard.cfg или proguard-project.txt (proguard-android.txt). Попробуйте этот код в обоих файлах.

Проверьте, удалили ли вы библиотеку из / libs, я удалил файл jar, который я установил, и он мгновенно сгенерировал мой apk! 🙂 Удачи!