mzsoft
Member
hi.
i want to use this library.
i write this code and work fine.
but now i need to set weather to Rain.
but this error show
I could not fix it.Can anyone help?
i want to use this library.
i write this code and work fine.
B4X:
#AdditionalJar: kotlin-stdlib-1.3.21
#AdditionalJar: WeatherView-3.0.0.aar
#AdditionalJar: confetti-1.1.1.aar
B4X:
Dim ctxt As JavaObject
ctxt.InitializeContext
weatherview.InitializeNewInstance("com.github.matteobattilana.weather.WeatherView", Array(ctxt, Null))
weatherview.RunMethod("setScaleFactor", Array(1.0F))
weatherview.RunMethod("setAngle", Array(0))
weatherview.RunMethod("setSpeed", Array(100))
'weatherview.RunMethod("setFadeOutPercent", Array(1.0F))
weatherview.RunMethod("setEmissionRate", Array(10.0F))
weatherview.RunMethod("setPrecipType", Array("SNOW"))
Activity.AddView(weatherview, 0, 0, 100%x, 100%y)
weatherview.RunMethod("resetWeather", Null)
but now i need to set weather to Rain.
B4X:
weatherview.RunMethod("setPrecipType", Array("RAIN"))
but this error show
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
java.lang.NoSuchFieldError: No instance field currentVelocityX of type F in class Lcom/github/matteobattilana/weather/confetti/MotionBlurBitmapConfetto; or its superclasses (declaration of 'com.github.matteobattilana.weather.confetti.MotionBlurBitmapConfetto' appears in /data/app/b4a.example.ra-1/base.apk)
at com.github.matteobattilana.weather.confetti.MotionBlurBitmapConfetto.drawInternal(WeatherConfettoGenerator.kt:39)
at com.github.jinatonic.confetti.confetto.Confetto.draw(Confetto.java:342)
at com.github.jinatonic.confetti.confetto.Confetto.draw(Confetto.java:332)
at com.github.jinatonic.confetti.ConfettiView.onDraw(ConfettiView.java:132)
at android.view.View.draw(View.java:15231)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3410)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3389)
at android.view.View.updateDisplayListIfDirty(View.java:14127)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3410)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3389)
at android.view.View.updateDisplayListIfDirty(View.java:14127)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3410)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3389)
at android.view.View.updateDisplayListIfDirty(View.java:14127)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3410)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3389)
at android.view.View.updateDisplayListIfDirty(View.java:14127)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3410)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3389)
at android.view.View.updateDisplayListIfDirty(View.java:14127)
at android.view.View.getDisplayList(View.java:14189)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2530)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2352)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1982)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
I could not fix it.Can anyone help?