renative
renative copied to clipboard
All Network Requests Fail in Android TV Build
All network requests are failing when an app is ran in the Android TV emulator. These same requests work fine in the Android emulator.
I have verified that ./platformBuilds/app_androidtv/app/src/main/AndroidManifest.xml
contains <uses-permission android:name="android.permission.INTERNET" />
.
Steps to reproduce:
-
rnv new
with default prompts. - Modify Home.tsx screen to execute a network request, e.g.
useEffect(() => {
fetch('https://api.publicapis.org/entries')
.then((response) => response.json())
.then((data) => console.log(data));
}, []);
- Run Android TV build:
rnv run -p androidtv
Fetch request fails with "TypeError: Network request failed".