How to disable method inlining in proguard?

ⅰ亾dé卋堺 提交于 2021-01-29 10:08:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!