0

I am having some troubles with Proguard. When I enable Proguard and then try to sign my application package, I get the following errors in my console:

Proguard returned with error code 1. See console
 Warning: com.jfeinstein.jazzyviewpager.MainActivity: can't find referenced field 'int jazzy_pager' in class com.jfeinstein.jazzyviewpager.R$id
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Editor
 Warning: it.sephiroth.android.library.disklrumulticache.DiskLruMultiCache: can't find referenced class com.jakewharton.disklrucache.DiskLruCache$Snapshot
       You should check if you need to specify additional program jars.
 Warning: there were 36 unresolved references to classes or interfaces.
          You may need to specify additional library jars (using '-libraryjars').
 Warning: there were 1 unresolved references to program class members.
          Your input classes appear to be inconsistent.
          You may need to recompile them and try again.
          Alternatively, you may have to specify the option 
          '-dontskipnonpubliclibraryclassmembers'.
 java.io.IOException: Please correct the above warnings first.
    at proguard.Initializer.execute(Initializer.java:321)
    at proguard.ProGuard.initialize(ProGuard.java:211)
    at proguard.ProGuard.execute(ProGuard.java:86)
    at proguard.ProGuard.main(ProGuard.java:492)

How do I dictate what modifications I need to make to my Proguard file to sign my application successfully? If anyone could help me out, that would be highly appreciated.

Blo
  • 11,903
  • 5
  • 45
  • 99
Jack
  • 2,043
  • 7
  • 40
  • 69
  • I recommend searching this repository https://github.com/krschultz/android-proguard-snippets in order to find proguard configuration of a library that you use. – dawid gdanski Jul 05 '15 at 09:01

1 Answers1

0

I think it depends on libraries you are using.

Try this:

-keepnames class com.jakewharton.disklrucache.** { *; }
-keepnames interface com.jakewharton.disklrucache.** { *; }
-dontskipnonpubliclibraryclassmembers
Alexey
  • 4,384
  • 1
  • 26
  • 34