を見つけることができない私は、リリースモードでProGuardのを可能にしていますが、アプリを起動した後に、このエラーを取得しています:ここで
Warning:FormActivity$1: can't find referenced method 'android.app.DatePickerDialog access$000(FormActivity)' in program class FormActivity
Warning:FormActivity$2: can't find referenced method 'android.app.DatePickerDialog access$000(FormActivity)' in program class FormActivity
Warning:FormActivity$3: can't find referenced method 'android.app.TimePickerDialog access$100(FormActivity)' in program class FormActivity
Warning:FormActivity$4: can't find referenced method 'void access$200(FormActivity,int,android.widget.LinearLayout,boolean)' in program class FormActivity
Warning:FormActivity$4: can't find referenced method 'void access$300(FormActivity,int,android.widget.LinearLayout,boolean)' in program class FormActivity
Warning:FormActivity$5: can't find referenced method 'android.widget.LinearLayout access$400(FormActivity,int,java.lang.String,android.widget.LinearLayout)' in program class FormActivity
Warning:FormActivity$5: can't find referenced method 'void access$500(FormActivity,int,android.widget.LinearLayout,boolean,boolean[],int,int)' in program class FormActivity
Warning:FormActivity$5: can't find referenced method 'void access$600(FormActivity,int,android.widget.LinearLayout,boolean,boolean[],int,int)' in program class FormActivity
Warning:FormActivity$6: can't find referenced method 'void access$700(FormActivity,int,int)' in program class FormActivity
Warning:FormActivity$7: can't find referenced method 'boolean access$802(FormActivity,boolean)' in program class FormActivity
Warning:FormActivity$8: can't find referenced method 'boolean access$802(FormActivity,boolean)' in program class FormActivity
は私のProGuardのファイルです:
-dontobfuscate
-dontoptimize
-optimizations !code/allocation/variable
#Start Project specifics
#Keep the BuildConfig
-keep class com.alouane.beapp.BuildConfig { *; }
#Keep the support library
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
#Gson
-keepattributes Signature
-keepattributes *Annotation*
-keep class sun.misc.Unsafe { *; }
-keep class com.dubai.fa.model.** { *; }
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
#Picasso
-dontwarn com.squareup.okhttp.**
# rx_cache
-dontwarn io.rx_cache2.internal.**
-keepclassmembers enum io.rx_cache2.Source { *; }
#RxJava
-keep class rx.schedulers.Schedulers {
public static <methods>;
}
-keep class rx.schedulers.ImmediateScheduler {
public <methods>;
}
-keep class rx.schedulers.TestScheduler {
public <methods>;
}
-keep class rx.schedulers.Schedulers {
public static ** test();
}
-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;
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}
-keep class com.google.**
-dontwarn com.google.**
-dontwarn sun.misc.**
#Timber
-dontwarn org.jetbrains.annotations.**
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
# standard
-keep public class * extends android.app.Activity
-keep public class * extends android.support.v7.app.ActionBarActivity
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keepclasseswithmembers class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
私が使用するライブラリのほとんど:Rxjava、ダガーは... ProGuardのルールを追加する必要はありません。
だから、これを解決する方法を知っていますか?私がリリースビルドにprougardを使用しているのは初めてです。ありがとう。
私は同じ問題を抱えています。私は「com.google.gson.reflect.TypeToken getParameterized(java.lang.reflect.Type、java.lang.reflect.Type [])」を使用しています。 TypeTokenクラスで-keepクラスをやっているだけではうまくいかないようです... – Squeazer