'When I do minifiyEnabled true and Add Progurad leads to Crash the App without it working fine
When I add proguard rules it crashes....well razorpay proguard works fine only the case with ExamSelectionActivity it crashes only when... I need to set proguard rules for shrinkResources true....
my proguard rules here:
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes JavascriptInterface
-keepattributes *Annotation*
-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}
-optimizations !method/inlining/*
-keepclasseswithmembers class * {
public void onPayment*(...);
}
-keep class com.examlounge.examloungeapp.view.ExamSelectionActivity
My progaurd rules
I have already the added class in proguard which its showing error
My error
2022-04-10 22:08:44.999 24493-24493/com.examlounge.examloungeapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.examlounge.examloungeapp, PID: 24493
java.lang.NullPointerException: it1 must not be null
at com.examlounge.examloungeapp.view.ExamSelectionActivity.c0(SourceFile:143)
at com.examlounge.examloungeapp.view.ExamSelectionActivity.S(Unknown Source:0)
at f4.b1.d(Unknown Source:4)
at androidx.lifecycle.LiveData.c(SourceFile:133)
at androidx.lifecycle.LiveData.d(SourceFile:151)
at androidx.lifecycle.LiveData.m(SourceFile:309)
at androidx.lifecycle.v.m(SourceFile:50)
at h4.g$c.w(SourceFile:124)
at yc.a.l(SourceFile:33)
at pd.v0.run(SourceFile:106)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7025)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
When I do minifyEnabled false its work fine
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
