Error when showing konfetti
jpal15 opened this issue · 2 comments
This is my code in Kotlin:
viewConfetti.build()
.addColors(Color.YELLOW, Color.GREEN, Color.MAGENTA)
.setDirection(0.0, 359.0)
.setSpeed(1f, 5f)
.setFadeOutEnabled(true)
.setTimeToLive(2000L)
.addShapes(Shape.Square, Shape.Circle)
.addSizes(Size(12))
.setPosition(-50f, viewConfetti.width + 50f, -50f, -50f)
.streamFor(300, 5000L)
When i call the method, the error below is showing.
java.lang.NoSuchMethodError: No direct method (ILjava/lang/Object;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V in class Lkotlin/jvm/internal/FunctionReferenceImpl; or its super classes (declaration of 'kotlin.jvm.internal.FunctionReferenceImpl' appears in /data/app/com.example.memorygame-q8cRzcGIZkucGmuyngv1ew==/base.apk)
Hi @jpal15,
If you have a java project make sure to add the stdlib to your project, more info here: https://github.com/DanielMartinus/Konfetti#java-project
If that's not it, a similar issue here with the wrong kotlin version configured: #235
Thank you! It works now.