Android Question FileNotFound exception for existing GIF file.

Discussion in 'Android Questions' started by Juzer Hussain, Jan 12, 2019 at 9:15 AM.

  1. Juzer Hussain

    Juzer Hussain Active Member Licensed 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
     
  2. sorex

    sorex Expert Licensed 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?
     
  3. Juzer Hussain

    Juzer Hussain Active Member Licensed User

    Thanks sorex here is the code
    Code:
    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
     
  4. sorex

    sorex Expert Licensed 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?).
     
  5. Juzer Hussain

    Juzer Hussain Active Member Licensed User

    This is a known issue. Other things i had already checked.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Can you post the full error message?
     
  7. Juzer Hussain

    Juzer Hussain Active Member Licensed 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
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    The library that you are using doesn't work properly with the virtual assets folder. You can disable it with:
    Code:
    #DebuggerForceStandardAssets: true
     
  9. Juzer Hussain

    Juzer Hussain Active Member Licensed 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
     
  10. Erel

    Erel Administrator Staff Member Licensed User

  11. Juzer Hussain

    Juzer Hussain Active Member Licensed 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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice