问题
My app is crashing with this error on Android 4.4 only
Fatal Exception: nTa: java.lang.IllegalAccessError: tried to access class dUa$a[] from class patient.healofy.vivoiz.com.healofy.userprofile.contactsync.ContactSyncManager at io.reactivex.plugins.RxJavaPlugins.onError + 367(RxJavaPlugins.java:367) at io.reactivex.internal.schedulers.ScheduledRunnable.run + 69(ScheduledRunnable.java:69) at io.reactivex.internal.schedulers.ScheduledRunnable.call + 57(ScheduledRunnable.java:57) at java.util.concurrent.FutureTask.run + 237(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 + 152(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run + 265(ScheduledThreadPoolExecutor.java:265) at java.util.concurrent.ThreadPoolExecutor.runWorker + 1112(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run + 587(ThreadPoolExecutor.java:587) at java.lang.Thread.run + 841(Thread.java:841)
I found that it is happening due to ProGuard method inlining.
I want to disable these two:
method/inlining/short Inlines short methods. method/inlining/unique Inlines methods that are only called once.
I have not specifically enabled them.
For detailed answer: https://medium.com/@ericluapp/a-journey-of-an-illegalaccesserror-issue-2c29b6ea968d
回答1:
In order to disable method inlining completely you can add this to your configuration
-optimizations !method/inlining/*
来源:https://stackoverflow.com/questions/58778424/how-to-disable-method-inlining-in-proguard