我是proguard的新手,我不明白如何解决我的问题。这似乎很容易,但我不知道如何解决它。
proguard.ParseException:在';'之前期待java类型第51行
低于错误显示:任务执行失败' :app:transformClassesAndResourcesWithProguardForRelease '
这是我的第51行:
-keep class rx.schedulers.Schedulers { public static ; }
proguard-rules.pro:
# Vungle
-dontwarn com.vungle.**
-dontnote com.vungle.**
-keep class com.vungle.** { *; }
-keep class javax.inject.*
# GreenRobot
-dontwarn de.greenrobot.event.util.**
# RxJava
-dontwarn rx.internal.util.unsafe.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode ;
}
-keep class rx.schedulers.Schedulers { public static ; }
-keep class rx.schedulers.ImmediateScheduler { public ; }
-keep class rx.schedulers.TestScheduler { public ; }
-keep class rx.schedulers.Schedulers { public static ** test(); }
# MOAT
-dontwarn com.moat.**
-keep class com.moat.** {
public protected private *;
}
-keep class com.tapjoy.** { *; }
-keep class com.moat.** { *; }
-keepattributes JavascriptInterface
-keepattributes *Annotation*
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keep class com.google.android.gms.ads.identifier.** { *; }
-dontwarn com.tapjoy.**
-keep public class com.google.gson
-keep class Gson**
-keepclassmembers class Gson** {
*;
}
-keepattributes Signature, *Annotation*
-keep class com.nativex.** {
*;
}
-keepattributes SourceFile,LineNumberTable
-keep class com.parse.*{ *; }
-dontwarn com.parse.**
-dontwarn com.squareup.picasso.**
-keepclasseswithmembernames class * {
native <methods>;
}
这个答案解决了我的问题:
使用
-keep class rx.schedulers.Schedulers {public static <methods>;}
取代
-keep class rx.schedulers.Schedulers { public static ; }
但现在出现了一个新的。
例外:
Exception while processing task java.io.IOException: Please correct the above warnings first.
这是我的警告:
Warning: there were 1 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options.
在大单Note: .....
我该怎么办?
答案 0 :(得分:0)
使用
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
取代
-keep class rx.schedulers.Schedulers { public static ; }