Android Question Webview file not found error

Discussion in 'Android Questions' started by swabygw, May 26, 2017.

  1. swabygw

    swabygw Active Member Licensed User

    Following this example here:

    I've put the animated GIF in the Files folder of my project, along with an HTML file, called StartupOverlay.html, which has the following code:

    <html><body><img src="lambda_flat_rotating_black_152x200.gif" /></body></html>

    The code in B4A looks like:
    Dim wv1 As WebView
    But getting the error: Webpage not available, The webpage at
    file:///android_asset/StartupOverlay.html could not be loaded because: net::ERR_FILE_NOT_FOUND[/code]

    I think I followed the example correctly, but I can't see the error that I must be making.
  2. An Schi

    An Schi Well-Known Member Licensed User

    There is a difference in using assets in debug and release mode.
    In debug you can use something like 'force assets'.
    In release mode it should work without that.
    Which mode do you use?

    (not sure if this is the solution for your problem....:oops:)
  3. swabygw

    swabygw Active Member Licensed User

    Thanks for the answer, but, actually, I can close this because I'm going to use an HTML file on my webserver instead (and I've got that working okay).
  4. swabygw

    swabygw Active Member Licensed User

    As a follow-up, though - I did try it in Release mode and it worked correctly. And...

    #DebuggerForceStandardAssets: True it to work in Debug mode.
    An Schi likes this.
  5. An Schi

    An Schi Well-Known Member Licensed User

    Thx for bringing the correct term, which i was too lazy for ;):cool:
  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