Я использую android jetpack, отладка работает совершенно нормально, но как только я пытаюсь создать подписанный apk с включенным minify true, я сталкиваюсь с этой проблемой
java.lang.NoClassDefFoundError: Failed resolution of: Lq0;
at java.lang.Class.getDeclaredFields(Native Method)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:10)
at c.i.d.k.a(SourceFile:65)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:35)
at c.i.d.k.a(SourceFile:65)
at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(SourceFile:3)
at retrofit2.Retrofit.nextResponseBodyConverter(SourceFile:6)
at retrofit2.Retrofit.responseBodyConverter(SourceFile:1)
at retrofit2.HttpServiceMethod.createResponseConverter(SourceFile:2)
at retrofit2.HttpServiceMethod.parseAnnotations(SourceFile:15)
at retrofit2.ServiceMethod.parseAnnotations(SourceFile:5)
at retrofit2.Retrofit.loadServiceMethod(SourceFile:4)
at retrofit2.Retrofit$1.invoke(SourceFile:5)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy2.callUpgradeApi(Unknown Source)
at c.a.b.b.a.c$a.run(SourceFile:7)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Правила Proguard следующие: 1004 *
-dontnote
-dontskipnonpubliclibraryclasses
-forceprocessing
-optimizationpasses 5
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static *** d(...);
public static *** v(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}
-assumenosideeffects class com.highorbit.jobseeker.util.helperUtils.Logger {
public static *** d(...);
public static *** e(...);
}
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-dontwarn javax.annotation.**
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-keepclasseswithmembers interface * {
@retrofit2.http.* <methods>;
}
-keep class sun.misc.Unsafe { *; }
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keepclassmembers enum * { *; }
-keepclassmembers enum * { *; }
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
-keep class * extends androidx.fragment.app.Fragment{}
Еще одна вещь, которую я не могу решить, это то, что я не могу получить точное имя файла и номер строки cra sh. Я добавил все правила Proguard для сбоев, но все еще безуспешно