草庐IT

android - 对文件 : Translation has been interrupted 进行索引时出现异常

coder 2023-12-20 原文

在我得到的项目上启用混淆器时

Exception while dexing files: Translation has been interrupted

不幸的是我不明白为什么 这是完整的输出——如果有人知道这是什么请告诉我:

:android:transformClassesAndResourcesWithProguardForNoMapsNoAnalyticsForFDroidRelease
ProGuard, version 5.2.1
Reading program jar [/home/ligi/git/PassbookForAndroid/android/libs/zxing-core-2.3.0-SNAPSHOT.jar] (filtered)
Reading program jar [/home/ligi/bin/android-sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.google.dagger/dagger/2.0.2/de8416eda7b2fd7c25836b140c39e1cbf10542f6/dagger-2.0.2.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/org.ligi/tracedroid/1.4/7e122fba2126b2a6043826f887e91f2c350c041f/tracedroid-1.4.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.9.1/e1908f47e7fd11b291dbc8368223db7b4d516b30/joda-time-2.9.1-no-tzdb.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup/otto/1.3.8/cf615176cd1177edf71d3c9605f8dc148fede6be/otto-1.3.8.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.6.0/98476622f10715998eacf9240d6b479f12c66143/okio-1.6.0.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/7.0.1/d5d13ea991eab0252e3710e5df3d6a9d4b21d461/butterknife-7.0.1.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.1/f7be08ec23c21485b9b5a1cf1654c2ec8c58168d/jsr305-3.0.1.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp/okhttp/2.7.2/20f6463eb19ac61960c5d91a094c2f4f0727dc2e/okhttp-2.7.2.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/net.lingala.zip4j/zip4j/1.3.2/4ba84e98ee017b74cb52f45962f929a221f3074c/zip4j-1.3.2.jar] (filtered)
Reading program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.nineoldandroids/library/2.4.0/e9b63380f3a242dbdbf103a2355ad7e43bad17cb/library-2.4.0.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.danlew/android.joda/2.9.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/cardview-v7/23.1.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.i2p.android.ext/floatingactionbutton/1.10.0/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/org.ligi/AXT/0.35/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/org.ligi/snackengage/0.4/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/libs/internal_impl-23.1.1.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.larswerkman/HoloColorPicker/1.5/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.steamcrafted/load-toast/1.0.9/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.squareup.leakcanary/leakcanary-android-no-op/1.3.1/jars/classes.jar] (filtered)
Reading program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/transforms/mergeJavaRes/noMapsNoAnalyticsForFDroid/release/jars/2/1f/main.jar] (filtered)
Reading program directory [/home/ligi/git/PassbookForAndroid/android/build/intermediates/classes/noMapsNoAnalyticsForFDroid/release] (filtered)
Reading library jar [/home/ligi/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.16.6/9d3a47307466b28632bf35f8972ae9d703879416/lombok-1.16.6.jar] (filtered)
Reading library jar [/home/ligi/.gradle/caches/modules-2/files-2.1/org.glassfish/javax.annotation/10.0-b28/30eb3b3cc9cb0863a4edaea5a7575f8ace1b96ba/javax.annotation-10.0-b28.jar] (filtered)
Reading library jar [/home/ligi/bin/android-sdk/platforms/android-23/android.jar]
Reading library jar [/home/ligi/bin/android-sdk/platforms/android-23/optional/org.apache.http.legacy.jar]
Note: duplicate definition of library class [android.net.http.SslError]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: there were 7 duplicate class definitions.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Note: the configuration refers to the unknown class 'fqcn.of.javascript.interface.for.webview'
Note: the configuration refers to the unknown class 'com.google.api.client.util.Key'
      Maybe you meant the fully qualified name 'java.security.Key'?
Note: android.support.v4.text.ICUCompatApi23: can't find dynamically referenced class libcore.icu.ICU
Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU
Note: android.support.v7.widget.DrawableUtils: can't find dynamically referenced class android.graphics.Insets
Note: com.squareup.okhttp.internal.Platform: can't find dynamically referenced class com.android.org.conscrypt.OpenSSLSocketImpl
Note: com.squareup.okhttp.internal.Platform: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl
Note: org.joda.time.DateTimeZone calls '(org.joda.time.tz.Provider)Class.forName(variable).newInstance()'
Note: org.joda.time.DateTimeZone calls '(org.joda.time.tz.NameProvider)Class.forName(variable).newInstance()'
Note: android.support.v4.text.ICUCompatApi23 accesses a method 'addLikelySubtags(java.util.Locale)' dynamically
      Maybe this is program method 'android.support.v4.text.ICUCompatIcs { java.lang.String addLikelySubtags(java.util.Locale); }'
Note: android.support.v4.text.ICUCompatIcs accesses a method 'addLikelySubtags(java.lang.String)' dynamically
Note: android.support.v7.widget.ViewUtils accesses a method 'makeOptionalFitsSystemWindows()' dynamically
Note: butterknife.internal.ButterKnifeProcessor accesses a declared method 'value()' dynamically
      Maybe this is program method 'android.support.annotation.IntDef { long[] value(); }'
      Maybe this is program method 'android.support.annotation.RequiresPermission { java.lang.String value(); }'
      Maybe this is program method 'android.support.annotation.RequiresPermission$Read { android.support.annotation.RequiresPermission value(); }'
      Maybe this is program method 'android.support.annotation.RequiresPermission$Write { android.support.annotation.RequiresPermission value(); }'
      Maybe this is program method 'android.support.annotation.Size { long value(); }'
      Maybe this is program method 'android.support.annotation.StringDef { java.lang.String[] value(); }'
      Maybe this is program method 'android.support.design.widget.CoordinatorLayout$DefaultBehavior { java.lang.Class value(); }'
      Maybe this is program method 'butterknife.Bind { int[] value(); }'
      Maybe this is program method 'butterknife.BindBool { int value(); }'
      Maybe this is program method 'butterknife.BindColor { int value(); }'
      Maybe this is program method 'butterknife.BindDimen { int value(); }'
      Maybe this is program method 'butterknife.BindDrawable { int value(); }'
      Maybe this is program method 'butterknife.BindInt { int value(); }'
      Maybe this is program method 'butterknife.BindString { int value(); }'
      Maybe this is program method 'butterknife.OnCheckedChanged { int[] value(); }'
      Maybe this is program method 'butterknife.OnClick { int[] value(); }'
      Maybe this is program method 'butterknife.OnEditorAction { int[] value(); }'
      Maybe this is program method 'butterknife.OnFocusChange { int[] value(); }'
      Maybe this is program method 'butterknife.OnItemClick { int[] value(); }'
      Maybe this is program method 'butterknife.OnItemLongClick { int[] value(); }'
      Maybe this is program method 'butterknife.OnItemSelected { int[] value(); }'
      Maybe this is program method 'butterknife.OnLongClick { int[] value(); }'
      Maybe this is program method 'butterknife.OnPageChange { int[] value(); }'
      Maybe this is program method 'butterknife.OnTextChanged { int[] value(); }'
      Maybe this is program method 'butterknife.OnTouch { int[] value(); }'
      Maybe this is program method 'javax.annotation.MatchesPattern { java.lang.String value(); }'
      Maybe this is program method 'javax.annotation.Syntax { java.lang.String value(); }'
      Maybe this is program method 'javax.annotation.concurrent.GuardedBy { java.lang.String value(); }'
      Maybe this is program method 'javax.annotation.meta.TypeQualifierDefault { java.lang.annotation.ElementType[] value(); }'
      Maybe this is program method 'javax.inject.Named { java.lang.String value(); }'
      Maybe this is library method 'android.annotation.SuppressLint { java.lang.String[] value(); }'
      Maybe this is library method 'android.annotation.TargetApi { int value(); }'
      Maybe this is library method 'dalvik.annotation.TestTargetClass { java.lang.Class value(); }'
      Maybe this is library method 'java.lang.SuppressWarnings { java.lang.String[] value(); }'
      Maybe this is library method 'java.lang.annotation.Retention { java.lang.annotation.RetentionPolicy value(); }'
      Maybe this is library method 'java.lang.annotation.Target { java.lang.annotation.ElementType[] value(); }'
      Maybe this is library method 'javax.annotation.Generated { java.lang.String[] value(); }'
      Maybe this is library method 'javax.annotation.Resources { javax.annotation.Resource[] value(); }'
      Maybe this is library method 'javax.annotation.security.DeclareRoles { java.lang.String[] value(); }'
      Maybe this is library method 'javax.annotation.security.RolesAllowed { java.lang.String[] value(); }'
      Maybe this is library method 'javax.annotation.security.RunAs { java.lang.String value(); }'
      Maybe this is library method 'lombok.Cleanup { java.lang.String value(); }'
      Maybe this is library method 'lombok.Getter { lombok.AccessLevel value(); }'
      Maybe this is library method 'lombok.Setter { lombok.AccessLevel value(); }'
      Maybe this is library method 'lombok.Singular { java.lang.String value(); }'
      Maybe this is library method 'lombok.SneakyThrows { java.lang.Class[] value(); }'
      Maybe this is library method 'lombok.Synchronized { java.lang.String value(); }'
      Maybe this is library method 'lombok.experimental.ExtensionMethod { java.lang.Class[] value(); }'
      Maybe this is library method 'lombok.experimental.Wither { lombok.AccessLevel value(); }'
Note: butterknife.internal.ButterKnifeProcessor accesses a declared method 'callback()' dynamically
      Maybe this is program method 'butterknife.OnItemSelected { butterknife.OnItemSelected$Callback callback(); }'
      Maybe this is program method 'butterknife.OnPageChange { butterknife.OnPageChange$Callback callback(); }'
      Maybe this is program method 'butterknife.OnTextChanged { butterknife.OnTextChanged$Callback callback(); }'
Note: com.squareup.okhttp.internal.Platform accesses a method 'tagSocket(java.net.Socket)' dynamically
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$BaseTrafficStatsCompatImpl { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$IcsTrafficStatsCompatImpl { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$TrafficStatsCompatImpl { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompatIcs { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'com.squareup.okhttp.internal.Platform { void tagSocket(java.net.Socket); }'
      Maybe this is program method 'com.squareup.okhttp.internal.Platform$Android { void tagSocket(java.net.Socket); }'
      Maybe this is library method 'android.net.TrafficStats { void tagSocket(java.net.Socket); }'
Note: com.squareup.okhttp.internal.Platform accesses a method 'untagSocket(java.net.Socket)' dynamically
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$BaseTrafficStatsCompatImpl { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$IcsTrafficStatsCompatImpl { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompat$TrafficStatsCompatImpl { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'android.support.v4.net.TrafficStatsCompatIcs { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'com.squareup.okhttp.internal.Platform { void untagSocket(java.net.Socket); }'
      Maybe this is program method 'com.squareup.okhttp.internal.Platform$Android { void untagSocket(java.net.Socket); }'
      Maybe this is library method 'android.net.TrafficStats { void untagSocket(java.net.Socket); }'
Note: com.squareup.okhttp.internal.Platform accesses a method 'remove(javax.net.ssl.SSLSocket)' dynamically
Note: the configuration keeps the entry point 'android.support.design.internal.NavigationMenuPresenter$1 { NavigationMenuPresenter$1(android.support.design.internal.NavigationMenuPresenter); }', but not the descriptor class 'android.support.design.internal.NavigationMenuPresenter'
Note: the configuration keeps the entry point 'android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter { NavigationMenuPresenter$NavigationMenuAdapter(android.support.design.internal.NavigationMenuPresenter); }', but not the descriptor class 'android.support.design.internal.NavigationMenuPresenter'
Note: there were 2 references to unknown classes.
      You should check your configuration for typos.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 2 unkept descriptor classes in kept class members.
      You should consider explicitly keeping the mentioned classes
      (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
Note: there were 5 unresolved dynamic references to classes or interfaces.
      You should check if you need to specify additional program jars.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 2 class casts of dynamically created class instances.
      You might consider explicitly keeping the mentioned classes and/or
      their implementations (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
Note: there were 8 accesses to class members by means of introspection.
      You should consider explicitly keeping the mentioned class members
      (using '-keep' or '-keepclassmembers').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Preparing output jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/transforms/proguard/noMapsNoAnalyticsForFDroid/release/jars/3/1f/main.jar]
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/libs/zxing-core-2.3.0-SNAPSHOT.jar] (filtered)
  Copying resources from program jar [/home/ligi/bin/android-sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.google.dagger/dagger/2.0.2/de8416eda7b2fd7c25836b140c39e1cbf10542f6/dagger-2.0.2.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/org.ligi/tracedroid/1.4/7e122fba2126b2a6043826f887e91f2c350c041f/tracedroid-1.4.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.9.1/e1908f47e7fd11b291dbc8368223db7b4d516b30/joda-time-2.9.1-no-tzdb.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup/otto/1.3.8/cf615176cd1177edf71d3c9605f8dc148fede6be/otto-1.3.8.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.6.0/98476622f10715998eacf9240d6b479f12c66143/okio-1.6.0.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/7.0.1/d5d13ea991eab0252e3710e5df3d6a9d4b21d461/butterknife-7.0.1.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.1/f7be08ec23c21485b9b5a1cf1654c2ec8c58168d/jsr305-3.0.1.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp/okhttp/2.7.2/20f6463eb19ac61960c5d91a094c2f4f0727dc2e/okhttp-2.7.2.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/net.lingala.zip4j/zip4j/1.3.2/4ba84e98ee017b74cb52f45962f929a221f3074c/zip4j-1.3.2.jar] (filtered)
  Copying resources from program jar [/home/ligi/.gradle/caches/modules-2/files-2.1/com.nineoldandroids/library/2.4.0/e9b63380f3a242dbdbf103a2355ad7e43bad17cb/library-2.4.0.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.danlew/android.joda/2.9.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/cardview-v7/23.1.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.i2p.android.ext/floatingactionbutton/1.10.0/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/org.ligi/AXT/0.35/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/org.ligi/snackengage/0.4/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/libs/internal_impl-23.1.1.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.larswerkman/HoloColorPicker/1.5/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/net.steamcrafted/load-toast/1.0.9/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/exploded-aar/com.squareup.leakcanary/leakcanary-android-no-op/1.3.1/jars/classes.jar] (filtered)
  Copying resources from program jar [/home/ligi/git/PassbookForAndroid/android/build/intermediates/transforms/mergeJavaRes/noMapsNoAnalyticsForFDroid/release/jars/2/1f/main.jar] (filtered)
  Copying resources from program directory [/home/ligi/git/PassbookForAndroid/android/build/intermediates/classes/noMapsNoAnalyticsForFDroid/release] (filtered)
:android:transformClassesWithDexForNoMapsNoAnalyticsForFDroidRelease
Exception while dexing files: Translation has been interrupted
:android:transformClassesWithDexForNoMapsNoAnalyticsForFDroidRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:transformClassesWithDexForNoMapsNoAnalyticsForFDroidRelease'.
> Translation has been interrupted

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 6.152 secs

这里是 proguard 配置:

#http://stackoverflow.com/questions/19274974/android-badparcelableexception-only-with-signed-apk
-keep class * implements android.os.Parcelable {
   public static final android.os.Parcelable$Creator *;
}

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
   public *;
}

# optimize
-optimizationpasses 2 
-optimizations !code/simplification/arithmetic 
-dontusemixedcaseclassnames 
-dontskipnonpubliclibraryclasses 

# AppCompat

-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }

# Keep line numbers to alleviate debugging stack traces 

-renamesourcefileattribute SourceFile 

-keepattributes SourceFile,LineNumberTable

### for api client


-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault

-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}

# Needed by Guava
# See https://groups.google.com/forum/#!topic/guava-discuss/YCZzeCiIVoI


-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue

# Needed by google-http-client-android when linking against an older platform version

-dontwarn com.google.api.client.extensions.android.**

# Needed by google-api-client-android when linking against an older platform version

-dontwarn com.google.api.client.googleapis.extensions.android.**


#### for butterknife
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }

-keepclasseswithmembernames class * {
    @butterknife.* <fields>;
    }

-keepclasseswithmembernames class * {
    @butterknife.* <methods>;
    }

#### for support 22
-dontwarn android.support.**

# Fix bug on Samsung, Wiko (and other) devices running Android 4.2
# See also: https://code.google.com/p/android/issues/detail?id=78377
-keepattributes **
-keep class !android.support.v7.view.menu.**,!android.support.design.internal.NavigationMenu,!android.support.design.internal.NavigationMenuPresenter,!android.support.design.internal.NavigationSubMenu,** {*;}

# See: https://stackoverflow.com/questions/30562330/using-appcompat-layout-behavior-with-string-appbar-scrolling-view-behavior
-keep class android.support.design.widget.** { *; }
-keep interface android.support.design.widget.** { *; }
-dontwarn android.support.design.**

# lombok
-dontwarn javax.**
-dontwarn lombok.**
-dontwarn org.apache.**
-dontwarn com.squareup.**
-dontwarn com.sun.**
-dontwarn **retrofit**
-dontwarn okio.**

最佳答案

由于类条目重复,progurad 失败。 有 7 个重复的类定义 根据proguard文件。 来源:http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass .

Note :- Your issue is due to the duplicate entry.

1.Move your jar file into the single folder such as

通过将第 3 方库移动到另一个目录(在我的例子中为“lib”)来修复此问题。然后添加

-injars libs

到 proguard.cfg 文件。 libs 是包含第三方所有 jar 文件的文件夹。

2.Added below configuration file.

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/yesidlazaro/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-keepclassmembers class ** {
    public void onEvent*(**);
}
# Keep GSON stuff
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.** { *; }

# Keep Jackson stuff
-keep class org.codehaus.** { *; }
-keep class com.fasterxml.jackson.annotation.** { *; }
# Keep these for GSON and Jackson
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes EnclosingMethod
# Keep the pojos used by GSON or Jackson
-keep class com.twnel.android.models.retrofit.** { *; }

# Keep Retrofit
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.** *;
}
-keepclassmembers class * {
    @retrofit.** *;
}

# Keep Picasso
-keep class com.squareup.picasso.** { *; }
-keepclasseswithmembers class * {
    @com.squareup.picasso.** *;
}
-keepclassmembers class * {
    @com.squareup.picasso.** *;
}
# OkHttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
# Butterknife
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }

-keepclasseswithmembernames class * {
    @butterknife.* <fields>;
}

-keepclasseswithmembernames class * {
    @butterknife.* <methods>;
}
#fix Proguard exception for some samsung devices
-keep class !android.support.v7.internal.view.menu.**,** {*;}

#craslytics
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
#amazon sdk
-keep class org.apache.commons.logging.**               { *; }
-keep class com.amazonaws.services.sqs.QueueUrlHandler  { *; }
-keep class com.amazonaws.javax.xml.transform.sax.*     { public *; }
-keep class com.amazonaws.javax.xml.stream.**           { *; }
-keep class com.amazonaws.services.**.model.*Exception* { *; }
-keep class org.codehaus.**                             { *; }
-keepattributes Signature,*Annotation*

-dontwarn javax.xml.stream.events.**
-dontwarn org.codehaus.jackson.**
-dontwarn org.apache.commons.logging.impl.**
-dontwarn org.apache.http.conn.scheme.**

-keep public class com.amazonaws.** { *; }
-keep public class com.fasterxml.jackson.core.** { *; }
# This dnsjava class uses old Sun API
-dontnote org.xbill.DNS.spi.DNSJavaNameServiceDescriptor
-dontwarn org.xbill.DNS.spi.DNSJavaNameServiceDescriptor
#more for squere libs

-dontwarn rx.**

-dontwarn okio.**

-dontwarn com.squareup.okhttp.*

-dontwarn retrofit.appengine.UrlFetchClient

-dontwarn com.fasterxml.**
-dontwarn com.googlecode.mp4parser.**

更多详情请关注此More confugration

关于android - 对文件 : Translation has been interrupted 进行索引时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35092586/

有关android - 对文件 : Translation has been interrupted 进行索引时出现异常的更多相关文章

  1. ruby - 使用 RubyZip 生成 ZIP 文件时设置压缩级别 - 2

    我有一个Ruby程序,它使用rubyzip压缩XML文件的目录树。gem。我的问题是文件开始变得很重,我想提高压缩级别,因为压缩时间不是问题。我在rubyzipdocumentation中找不到一种为创建的ZIP文件指定压缩级别的方法。有人知道如何更改此设置吗?是否有另一个允许指定压缩级别的Ruby库? 最佳答案 这是我通过查看ruby​​zip内部创建的代码。level=Zlib::BEST_COMPRESSIONZip::ZipOutputStream.open(zip_file)do|zip|Dir.glob("**/*")d

  2. ruby-on-rails - 使用 Ruby on Rails 进行自动化测试 - 最佳实践 - 2

    很好奇,就使用ruby​​onrails自动化单元测试而言,你们正在做什么?您是否创建了一个脚本来在cron中运行rake作业并将结果邮寄给您?git中的预提交Hook?只是手动调用?我完全理解测试,但想知道在错误发生之前捕获错误的最佳实践是什么。让我们理所当然地认为测试本身是完美无缺的,并且可以正常工作。下一步是什么以确保他们在正确的时间将可能有害的结果传达给您? 最佳答案 不确定您到底想听什么,但是有几个级别的自动代码库控制:在处理某项功能时,您可以使用类似autotest的内容获得关于哪些有效,哪些无效的即时反馈。要确保您的提

  3. ruby - 其他文件中的 Rake 任务 - 2

    我试图在一个项目中使用rake,如果我把所有东西都放到Rakefile中,它会很大并且很难读取/找到东西,所以我试着将每个命名空间放在lib/rake中它自己的文件中,我添加了这个到我的rake文件的顶部:Dir['#{File.dirname(__FILE__)}/lib/rake/*.rake'].map{|f|requiref}它加载文件没问题,但没有任务。我现在只有一个.rake文件作为测试,名为“servers.rake”,它看起来像这样:namespace:serverdotask:testdoputs"test"endend所以当我运行rakeserver:testid时

  4. ruby-on-rails - 在 Rails 中将文件大小字符串转换为等效千字节 - 2

    我的目标是转换表单输入,例如“100兆字节”或“1GB”,并将其转换为我可以存储在数据库中的文件大小(以千字节为单位)。目前,我有这个:defquota_convert@regex=/([0-9]+)(.*)s/@sizes=%w{kilobytemegabytegigabyte}m=self.quota.match(@regex)if@sizes.include?m[2]eval("self.quota=#{m[1]}.#{m[2]}")endend这有效,但前提是输入是倍数(“gigabytes”,而不是“gigabyte”)并且由于使用了eval看起来疯狂不安全。所以,功能正常,

  5. ruby-on-rails - Rails 3 中的多个路由文件 - 2

    Rails2.3可以选择随时使用RouteSet#add_configuration_file添加更多路由。是否可以在Rails3项目中做同样的事情? 最佳答案 在config/application.rb中:config.paths.config.routes在Rails3.2(也可能是Rails3.1)中,使用:config.paths["config/routes"] 关于ruby-on-rails-Rails3中的多个路由文件,我们在StackOverflow上找到一个类似的问题

  6. ruby-on-rails - 按天对 Mongoid 对象进行分组 - 2

    在控制台中反复尝试之后,我想到了这种方法,可以按发生日期对类似activerecord的(Mongoid)对象进行分组。我不确定这是完成此任务的最佳方法,但它确实有效。有没有人有更好的建议,或者这是一个很好的方法?#eventsisanarrayofactiverecord-likeobjectsthatincludeatimeattributeevents.map{|event|#converteventsarrayintoanarrayofhasheswiththedayofthemonthandtheevent{:number=>event.time.day,:event=>ev

  7. ruby - 将差异补丁应用于字符串/文件 - 2

    对于具有离线功能的智能手机应用程序,我正在为Xml文件创建单向文本同步。我希望我的服务器将增量/差异(例如GNU差异补丁)发送到目标设备。这是计划:Time=0Server:hasversion_1ofXmlfile(~800kiB)Client:hasversion_1ofXmlfile(~800kiB)Time=1Server:hasversion_1andversion_2ofXmlfile(each~800kiB)computesdeltaoftheseversions(=patch)(~10kiB)sendspatchtoClient(~10kiBtransferred)Cl

  8. ruby - ECONNRESET (Whois::ConnectionError) - 尝试在 Ruby 中查询 Whois 时出错 - 2

    我正在用Ruby编写一个简单的程序来检查域列表是否被占用。基本上它循环遍历列表,并使用以下函数进行检查。require'rubygems'require'whois'defcheck_domain(domain)c=Whois::Client.newc.query("google.com").available?end程序不断出错(即使我在google.com中进行硬编码),并打印以下消息。鉴于该程序非常简单,我已经没有什么想法了-有什么建议吗?/Library/Ruby/Gems/1.8/gems/whois-2.0.2/lib/whois/server/adapters/base.

  9. ruby - 在 64 位 Snow Leopard 上使用 rvm、postgres 9.0、ruby 1.9.2-p136 安装 pg gem 时出现问题 - 2

    我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po

  10. ruby - 如何将脚本文件的末尾读取为数据文件(Perl 或任何其他语言) - 2

    我正在寻找执行以下操作的正确语法(在Perl、Shell或Ruby中):#variabletoaccessthedatalinesappendedasafileEND_OF_SCRIPT_MARKERrawdatastartshereanditcontinues. 最佳答案 Perl用__DATA__做这个:#!/usr/bin/perlusestrict;usewarnings;while(){print;}__DATA__Texttoprintgoeshere 关于ruby-如何将脚

随机推荐