[Android] Local html file don't work on debug
See original GitHub issueWorks on core RN’s webview, but this package make this error:
TypeError: TypeError: TypeError: source is not an Object. (evaluating ‘‘method’ in source’)
with local file in source prop
source={require('../index.html')}
But works correctly with url in source prop
source={{uri: 'http://mysite.com' }}
Android Debug
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:12
Top Results From Across the Web
[Android] Local html file don't work on debug #549 - GitHub
I need to render local HTML file with Javascript and assest in it. So for tempary fix i have to host that page...
Read more >Loading Local Files on Android With Local HTML - net
I've always placed my files in the android 'assets' folder. Then, you can do something like this for the HTML: webView.
Read more >Why can't Chrome read a local HTML file on Android? - Quora
The most common reason for seeing HTML in the browser is the Content-Type header sent by the web server. · You can inspect...
Read more >Open local html file on android - Mozilla Support
It works on Opera. 2) If I go to a file manager, select an html file, and click "Open with", firefox doesn't show...
Read more >Loading in-app content - Android Developers
Your app may need to load a mix of in-app content and content from the internet, such as an in-app HTML page styled...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes Same here. I need to render local HTML file with Javascript and assest in it. So for tempary fix i have to host that page on web and access it from there. But that solution is so slow rendering… 😦
@luckcoding I tried the same but it’s showing an
ERR_FILE_NOT_FOUND
. I did place my html file underandroid/app/src/main/assets/
and I had the following done too:allowFileAccess={true}
domStorageEnabled={true}
javaScriptEnabled={true}
Currently, I’m forced to keep loading my htmls statically, copying and pasting after every change (which is really painful)