What causes this error in Proguard: “Method must be overridden in [proguard.optimize.peephole.ClassMerger] if ever called”?

两盒软妹~` 提交于 2019-12-13 08:50:56

问题


I am running Proguard via the Maven Plugin, you can see my configuration here: https://github.com/sanity/tahrir/blob/proguard-debug/pom.xml#L61

You can see the complete output of "mvn -DskipTests assembly:assembly" here: https://gist.github.com/ee1081179496e11916cb

Despite quite a bit of searching I cannot find any explanation of what causes this error, nor now I can fix it?


回答1:


Your input contains a library class that depends on a program class. ProGuard warns about it and doesn't allow it, unless you specify -dontwarn. You should remove that option and check ProGuard's warnings for details.

See the ProGuard manual > Introduction

See the ProGuard manual > Troubleshooting > Warning: library class ... depends on program class ...




回答2:


For me, having

proguard.config=proguard-project.txt

caused the same error. Correcting to include both sdk and my config file like below fixed it.

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt


来源:https://stackoverflow.com/questions/19388167/what-causes-this-error-in-proguard-method-must-be-overridden-in-proguard-opti

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