I’m working with React Native and I’m using Webview from ‘react-native-webview’.
import React, { useEffect } from 'react'
import { Text, SafeAreaView } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import WebView from 'react-native-webview';
import { styles } from '../theme/appTheme';
export const AtmungBienenflugScreen = () => {
const navigator = useNavigation();
useEffect( () => {
navigator.setOptions({
title:'',
headerTintColor: 'black',
})
})
return (
<SafeAreaView style={styles.container}>
<Text style={ styles.titleLekt}>2.4 Bienenflug</Text>
<WebView
style= { styles.video }
autoPlay
playsInline
source={{ uri: 'https://www.youtube.com/watch?v=QzqmlgnSE38' }} />
</SafeAreaView>
)
}
On IOS is working fine, but on Android is not, shows this error on the terminal:
Encountered an error loading page {“canGoBack”: false, “canGoForward”: false, “code”: -2, “description”: “net::ERR_NAME_NOT_RESOLVED”, “loading”: false, “target”: 789, “title”: “”, “url”: “https://www.youtube.com/watch?v=QzqmlgnSE38”}
And displaying this error on emulator:
Error loading page
Domain: undefined
Error code: -2
Description: net::ERR_NAME_NOT_RESOLVED
Does someone have an idea what’s the problem there?