Android Question FileNotFound exception for existing GIF file.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi,

I am using 8.5 and i am trying to add giff file available in assets folder.This is a known issue.As per a thread by Erel in the forum I replaced Debug.jar file also but still in debug mode it says FileNotFound exception for a giff file.

Is there anything more to be done?
Pls inform if any clue.

Thanks
Juzer
 

sorex

Expert
Licensed User
Longtime User
I only had this issue on IOS so far where it required an removal of the app on the device.

Can you show the code you're using?
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Thanks sorex here is the code
B4X:
btnStop.Enabled=True
    mp.Load(File.Dirinternal, sAudioFile)
    mp.Play
    timer1.Enabled=True
    pbPlay.Visible=True
   
    gif.DisposeFrames
    gif.Load(File.DirAssets, "audio.gif")
    Frame = 0
    timer2.Interval = gif.Delay(Frame)
    Iv.Bitmap = gif.Frame(Frame)
    timer2.Enabled = True
Issue comes in gif.load statement.

Juzer
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
steps you can try/verify...

click on the sync button again in the files panel and see if it's there.
add .zip to the apk filename in the objects folder and open it to see if the file is actually there.

maybe it wasn't added for some reason (missing sync or wrong filename?).
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

This is the error log unfiltered.

Error occurred on line: 303 (frmViewDailyLog)
setConfig(4d:google.raw.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
codec does not support config priority (err -2147483648)
MediaCodec will operate in async mode
notifyListener_l(0xb8a7cfa8), (6, 0, 0)
java.io.FileNotFoundException: audio.gif
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:313)
at android.content.res.AssetManager.open(AssetManager.java:287)
at anywheresoftware.b4a.agraham.gifdecoder.GifDecoder.Load(GifDecoder.java:208)
at com.mywardmonitor.frmviewdailylog._btnplay_click(frmviewdailylog.java:828)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:733)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:352)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21153)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
null: 720

Juzer
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Many Thanks Erel, Its working now.
I am simply trying to run a giff while audio is running.
Can you pls direct me to related link

Juzer
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,
Thanks again. I had already tried your example but while searching for GifDecoder I came across another example(above) and tried that it but did not work.
This one is really straightforward.

Juzer
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…