Error loading page
Domain:undefined
Error Code:-2
Description:net::ERR_NAME_NOT_RESOLVED
Getting this issue in release apk in android react native
I already used android:usesCleartextTraffic="true" in menifest file
Error loading page
Domain:undefined
Error Code:-2
Description:net::ERR_NAME_NOT_RESOLVED
Getting this issue in release apk in android react native
I already used android:usesCleartextTraffic="true" in menifest file
2
Answers
In release apk may be android is unable to find the path of your html file.
To properly load a local HTML file (e.g., index.html) in your React Native WebView, you need to ensure that the file is placed in the correct directory and referenced correctly in your code.
Explanation:
is used to reference the HTML file in the assets folder on Android. This path is recognized by the Android system during the release build.
Additional Notes:
in your AndroidManifest.xml if you are also loading any HTTP content.