How to solve Flutter Error No address associated with hostname in socket_patch lookup()

147 views Asked by At

When i try http post request with Dio in my Android emulator, i get the "No address associated with hostname " Exception in this part

Follwing code is already in Manifest

this part

      {InternetAddressType type = InternetAddressType.any}) {
    return _IOService._dispatch(_IOService.socketLookup, [host, type._value])
        .then((response) {
      if (isErrorResponse(response)) {
        throw createError(response, "Failed host lookup: '$host'");
      }

Manifest

    <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />```
0

There are 0 answers