"flutter (os error: no address associated with hostname, errno = 7)" only for android

Add < uses-permission android:name="android.permission.INTERNET"/> to your Manifest.xml file. In your AVD Manager select the device and wipe out data by going on options (Arrow down button). Restart your emulator. Rerun the application.


if < uses-permission android:name="android.permission.INTERNET"/> is added to your Manifest.xml file and you still get this error,

then be assured that this error is thrown when there is a slow network on the laptop you are using to run the AVD


I had the same problem. Follow these steps: In android studio go to AVD manager and then from actions tab, click on wipe data image