Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29428

JS scripts not loading in WebView on Android when testing with Expo

$
0
0

SDK Version: 3.15.4

Platforms: Android

I’m testing my app on Android with Expo. One of my screens is a WebView loading a site from a URL. JavaScript in <script></script> tags doesn’t seem to be loading. Inline Javascript, on the other hand, loads fine. Also, the entire WebView works perfectly fine when testing with Expo on iOS.

Here’s my WebView component:

<WebView    source={{ uri: "www.website.com"}}      renderLoading={this.renderLoading}>    startInLoadingState    javaScriptEnabled    onMessage={ event => { alert("hello") }} />

Is there a chance Android doesn’t load JS scripts in WebView when testing on Expo while it would work in production?

I have done the usual googling around and have implemented some recommended fixes like editing android/gradle.properties.

Thanks a lot for any suggestions!


Viewing all articles
Browse latest Browse all 29428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>