0

react native webview not working in android 10 or higher. It works fine in dev mode but shows just a white screen in production mode.

<WebView
  ref={webView}
  javaScriptEnabled
  injectedJavaScript={initialJs}
  source={{
    uri: "http://www.example.com",
  }}
  onMessage={(event) => {
    console.log(event);
  }}
/>

1 Answer 1

1

This might have something to do with clearTextTraffic in your android manifest

<application
    android:usesCleartextTraffic="true"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.