What causes this error in Proguard: “Method must b

2019-09-03 02:49发布

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?

2条回答
爷、活的狠高调
2楼-- · 2019-09-03 03:10

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 ...

查看更多
孤傲高冷的网名
3楼-- · 2019-09-03 03:23

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
查看更多
登录 后发表回答