Issue
I have a strange problem showing local data in WebView
. In my project neither loadData
nor loadDataWithBaseUrl
just not working specifically in release build. Showing content from url with loadUrl
working fine in both debug and release, but I need to show local data. The error is like:
"Web page not available The web page at data:text/html; charset=utf-8;charset=utf-8;base64, could not be loaded because: net::ERR_INVALID_RESPONSE"
There is a lot of questions on stackoverflow with this error, but all of them either address issues with encoding or specific to some Android version. I tried solutions from countless answers, but it only slightly changes text inside error (this part data:text/html; charset=utf-8;charset=utf-8;base64
). Also in my case all android versions have a problem, and I'm not using any special symbols in html content or anything, just simplest possible document:
<html><body>test</body></html>
The only way that I was able to show local data in WebView
is creating new project from scratch. In new project everything just works. So it's make me think issue is related to some project configuration. I don't know if it's something in gradle, proguard, dexprotector or anyting else.
Can anyone give some advice what it can be?
Solution
Disabling DexProtector's Public Key Pinning actually make it work. Now have to configure this somehow to work with Public Key Pinning.
Answered By - AlexanderShirshov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.