-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot be cast to kotlin.jvm.functions.Function0 #182
Comments
Did you find out how to fix this? I'm having the exact same problem using the latest version (2.3.0) |
Hi I'll investigate the problem. Do you have a project where the problem can be reproduced? That would make my investigation much easier. If not, can you post more code and more context about how you are using the library? Thanks! |
Hi, I found a workaround. As @mattwatson-dev stated, this problem happens when coding in Java instead of Kotlin. The exception happens when passing either a lambda function or an OnAnimationEndListener instance to startAnimation:
The workaround is to pass a Function0 instance instead: |
Coding in java.
...
loginButton.revertAnimation(new OnAnimationEndListener() { //*LoginActivity.java:54 below
@OverRide
public void onAnimationEnd() {
System.out.println("HIT");
}
});
Really enjoying your work!
Let me know if you can help.
The text was updated successfully, but these errors were encountered: