Proguard causes `NoSuchMethodException`
See original GitHub issueHey! Just want to say first that I really appreciate your work.
I’m using this library in an application and found a bug when using proguard. Without any changes to the proguard.project.txt
file, I get this error when trying to use the animations:
W/System.err(22899): java.lang.NoSuchMethodException: <init> [float]
W/System.err(22899): at java.lang.Class.getConstructorOrMethod(Class.java:472)
W/System.err(22899): at java.lang.Class.getConstructor(Class.java:446)
W/System.err(22899): at com.daimajia.easing.Skill.a(SourceFile:104)
W/System.err(22899): at com.daimajia.easing.Glider.a(SourceFile:33)
I worked around this by adding to my proguard-project.txt
file:
-keep class com.daimajia.easing.** { *; }
-keep interface com.daimajia.easing.** { *; }
It might be helpful to add this to documentation (like the README).
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Proguard enabled NoSuchMethodException - android
I think the problem is with your model class used in RecyclerView adapter. · Kindly check, I posted Users model class · 1...
Read more >ProGuard Manual: Troubleshooting - Guardsquare
If ProGuard is not keeping the right classes or class members, make sure you are using fully qualified class names. If the package...
Read more >ProGuard Troubleshooting
If the package name of some class is missing, ProGuard won't match the elements that you might be expecting. It may help to...
Read more >App crashed when generating apk with Proguard - Issue Tracker
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.NoSuchMethodException: <init> [class android.app.Application]
Read more ><init> [class android.app.Activity, int] - Google Groups
Obfuscated build gives NoSuchMethodException: <init> [class android.app.Activity, int] ... I've got the recommended proguard config as shown below.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve encountered exactly the same issue today. The following rule helped me:
The source of the problem is that constructors are called indirectly. This rule prevents proguard from removing constructors instead of forcing it to keep everything.
Thank you so much @ultimate-deej! You saved my day!