Open HTML file from assets folder

后端 未结 5 1754
没有蜡笔的小新
没有蜡笔的小新 2021-01-20 02:21

I am trying to open local html file in my Android application.

The file is located under my assets folder. So I am setting a WebViewClient and loading my page into i

5条回答
  •  清歌不尽
    2021-01-20 02:45

    Try to use the below code for loading the html

    "file:///android_asset/enrollment.html" 
    

    instead of

    "file:///assets/enrollment.html"
    

提交回复
热议问题