NoClassDefFoundError in Android Studio in library


Suddenly I am receiving this error

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/animation/Animator$AnimatorListener$$CC;

from this code snippet out of the ShineButton library.

So basically the app crashes with new AnimatorListener() {...} and I don't know how to fix it.

Solution Approach

I have an older version of my project, I say older because it is a backup, but I did not really change much and especially nothing related to this library. Though in that backup version the app works just fine. So nothing changed in my code related to the problem and nothing in the library. Because of that I think that this is an Android Studio related problem, i. e. some kind of build problem.

I tried cleaning and rebuilding the project multiple times, but I am still getting this same error. I also tried to re-import the libraries, but this error stays.

*I even deleted all my IntelliJ related folders, lib and build folders etc. and even started a new project and copied everything in. I think that it might be Java 8's fault.

Extra Information

I am building my project in Android Studio 3.0 Canary 4 in Android O and I am using version 0.1.7 of ShineButton.

The error occurs when pressing a ShineButton with it executing its animation.

Issue on GitHub

1 answer

  • answered 2017-06-17 19:16 user1209216

    Try to clear your project. Then invalidate cache & restart. After restart, rebuild your project again