Not possible to use react-native-webview


Recently I had problems with the Webview component, it is not possible to upload a file in Android devices,so I checked the react-native-webview component that is supposed to replace the core React Native one.
I installed it following the instructions (it is just a yarn command) but when I ran it I got an error:

I have earlier used third-party components, where no native code is required to be updated, (as in this particular case) and it all went fine. Does anyone know why I get this error in Expo?
Am I missing something regarding the installation?


I tried using that same library for my app but decided to just use the vanilla WebView from react-native

What do you need from this web view component that you can’t do with the regular WebView from react-native?

I wasn’t aware of that component. I will give it a try.
However, I need something more advanced like webview, that allows java injections and agent definitions.

You mention that you have tried the react-native-webview component.
Did you manage to make it work or did get the same error?

I got a different error but I can’t recall, it was a few weeks ago when I tried it.

Are you trying to communicate with what you put in your webview?

Yes, there is some interaction with the webpage.
My problem is that the webview does not allow image uploading on android.

@vasilios There might be some solutions found here -

Thanks for your help.
I have gone through all those solutions but they don’t work with Expo because they require native code changes.
I hoped that the react-native-webview component would work because I didn’t see any native code, but I was wrong.

@vasilios I might be facing the same issue in the near future as I continue to develop my app, will post here on updates if I find any solutions.

1 Like

Thanks again for your help.
I appreciate it.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.