Android Question UltimateWebViewClient constant 404 error

Semendey

Member
I use UltimateWebViewClient to display a page from my local server via HTTP.
I have two devices Android 5 and Android 6 On Android 6 I constantly get a 404 error in ReceivedHttpError,
while my page loads and works fine, but there is still an error in the log.


Maybe I need to enable something from the settings additionally to prevent the error from appearing?
 

drgottjr

Expert
Licensed User
Longtime User
the only way to prevent such an error is to provide the resource the webview is asking for. for example, if your local web page does not have a fav.ico, that would trigger an http 404 error, yet have nothing to do with a successful loading of the rest of your request. i assume your ultimatewebviewclient library makes a webchromeclient available. the log should confirm which resource is triggering the error. it isn't necessarily germane to compare android 5 vs android 6, or the particular versions of webview running on your devices. the only way to prevent an error message is to remove the error. error 404 refers to a missing resource. identify the resource and make it available. a missing fav.ico is typical.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…