:app:transformClassesAndResourcesWithProguardForRelease
:app:transformClassesAndResourcesWithProguardForRelease
我是 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: .....
我该怎么办?
使用
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
代替
-keep class rx.schedulers.Schedulers { public static ; }
我是 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: .....
我该怎么办?
使用
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
代替
-keep class rx.schedulers.Schedulers { public static ; }