0

我在使用 Proguard 时遇到了一些麻烦。当我启用 Proguard 然后尝试签署我的应用程序包时,我在控制台中收到以下错误:

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)

我如何规定我需要对我的 Proguard 文件进行哪些修改才能成功签署我的应用程序?如果有人可以帮助我,那将不胜感激。

4

1 回答 1

0

我认为这取决于您使用的库。

尝试这个:

-keepnames class com.jakewharton.disklrucache.** { *; }
-keepnames interface com.jakewharton.disklrucache.** { *; }
-dontskipnonpubliclibraryclassmembers
于 2015-07-05T07:03:16.637 回答