Android Question b4xgifview error when run project

Status
Not open for further replies.

meysam211

Member

Attachments

  • image_2026-07-19_141424074.png
    image_2026-07-19_141424074.png
    212.6 KB · Views: 95

meysam211

Member
The example works fine here...

Have you downloaded the additional dependencies and copied them to the additional libs folder: https://www.b4x.com/android/forum/t...ss-platform-animated-gif-view.118550/#content

Can you post the full text from the compilation window?

Last question - are you running it on a real device? Which one?

B4X:
Logger connected to:  Xiaomi 2404ARN45A
--------- beginning of main
*** Service (starter) Create ***
*** Service (starter) Create completed ***
*** Service (starter) Started ***
** Service (starter) Start **
*** Service (starter) Started completed ***
** Activity (main) Create (first time) **
Error occurred on line: 83 (B4XGifView)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1142)
    at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1068)
    at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:425)
    at b4a.example.b4xpagesmanager._addpage(b4xpagesmanager.java:245)
    at b4a.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:259)
    at b4a.example.b4xpagesmanager._initialize(b4xpagesmanager.java:165)
    at b4a.example.main._activity_create(main.java:415)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at b4a.example.main.afterFirstLayout(main.java:105)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:1029)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:274)
    at android.os.Looper.loop(Looper.java:369)
    at android.app.ActivityThread.main(ActivityThread.java:10090)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:616)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1137)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
    at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
    ... 25 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
    ... 26 more
Caused by: java.lang.ClassNotFoundException: pl$droidsonroids$gif$GifDrawable
    at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:316)
    at anywheresoftware.b4j.object.JavaObject.InitializeNewInstance(JavaObject.java:104)
    at b4a.example.b4xgifview._setbitmap(b4xgifview.java:211)
    at b4a.example.b4xgifview._setgif2(b4xgifview.java:241)
    at b4a.example.b4xgifview._setgif(b4xgifview.java:57)
    at b4a.example.b4xmainpage._b4xpage_created(b4xmainpage.java:57)
    ... 28 more
** Activity (main) Resume **
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
I checked your project just now and.............. I am sorry (or happy?) to inform you that it works perfectly.
So the only thing that come to my mind is that there must be something not correct in the B4A installation, plus libraries and so on.
I know that you did it twice, but in this moment I have no idea better than this.
Maybe it's worth to uninstall B4A and delete everything (SDK and Java) and redo it again downloading everything new.
Probably it's just a single small detail that is ruining something.
 
Upvote 0

meysam211

Member
I checked your project just now and.............. I am sorry (or happy?) to inform you that it works perfectly.
So the only thing that come to my mind is that there must be something not correct in the B4A installation, plus libraries and so on.
I know that you did it twice, but in this moment I have no idea better than this.
Maybe it's worth to uninstall B4A and delete everything (SDK and Java) and redo it again downloading everything new.
Probably it's just a single small detail that is ruining something.
So why does the program run correctly and not give any errors with the previous version of the same library that gives a 16kb error in the console play?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
So why does the program run correctly and not give any errors with the previous version of the same library that gives a 16kb error in the console play?
You keep returning to this question, however this is not an important question. The old library can no longer be used.
The new library works if you follow the instructions. No reason to continue this endless discussion.
 
Upvote 0
Status
Not open for further replies.
Top