How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7)
Adding internet permission is not only a solution.
You also have to make sure that you are online whether it is mobile or emulator
Make sure you are online whether it is mobile or emulator
Make sure you have given internet permission in your app's android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
Try adding <uses-permission android:name="android.permission.INTERNET" />
to your AndroidManifest.xml
file.
Had the same issue. Added uses-permission android:name="android.permission.INTERNET" to "android/app/src/main/AndroidManifest.xml". Still couldn't work, then I quit and restarted the emulator, then it worked.