Android Question Is it normal that .html files in Objects\bin\extra\assets dissapear after compile/run? [Solved]

Discussion in 'Android Questions' started by Francisco Gonzalez 1962, Aug 22, 2019.

  1. Francisco Gonzalez 1962

    Francisco Gonzalez 1962 Member Licensed User

    I've placed a disclaimer.html file in Objects\bin\extra\assets folder
    After compiling/running my program to display disclaimer.html
    using:
    WebView1.LoadUrl("file:///android_asset/disclaimer.html")
    I get an error message:

    Web page not available
    It was not possible to load the web page
    file:///android_asset/disclaimer.html
    because:

    net::ERR_FILE_NOT_FOUND

    After this trial, I checked the folder with windows file manager and it's empty with a message saying we are working on it
     
  2. DonManfred

    DonManfred Expert Licensed User

    this is the normal behaviour.
    to prevent this you need to make the files readonly.

    The correct way would be to place the files in your projects files folder and load them from there.
     
  3. Francisco Gonzalez 1962

    Francisco Gonzalez 1962 Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    Never use file:///android_asset. It will not work in debug mode.

    Use XUI.FileUri instead.
     
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