DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.18k stars 301 forks source link

java.lang.NoSuchMethodError: No direct method <init> #232

Closed Nicklezz closed 3 years ago

Nicklezz commented 3 years ago

Hi,

I get the following error when copying and pasting the example code in to my project:

 java.lang.NoSuchMethodError: No direct method <init>(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.iogame-Kf5I23Yoh14KRwdJEJD5EQ==/base.apk)
    at nl.dionsegijn.konfetti.emitters.RenderSystem$1.<init>(Unknown Source:10)
    at nl.dionsegijn.konfetti.emitters.RenderSystem.<init>(RenderSystem.kt:40)
    at nl.dionsegijn.konfetti.emitters.RenderSystem.<init>(RenderSystem.kt:27)
    at nl.dionsegijn.konfetti.ParticleSystem.startRenderSystem(ParticleSystem.kt:286)
    at nl.dionsegijn.konfetti.ParticleSystem.streamFor(ParticleSystem.kt:245)
    at com.example.iogame.MainActivity$setAnswerOnClickListener$1.onClick(MainActivity.kt:77)

Any idea on the cause to the problem?

Nicklezz commented 3 years ago

Seems to be a duplicate.