Could not resolve URL "https://pub.dartlang.org". Error (69): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

7,736

Solution 1

What didn't work for me:-

flutter clean

flutter pub cache repair

And what WORKED!

killall -9 dart //THIS STOPPED THE CONTINUE REQUEST

After changing the Wifi/Internet Connection, it worked strangely!

It seems some DNS cache issue (not 100% sure), but I am happy that it worked :)

Solution 2

This would also mean that flutter might not be able to connect to your device if you're trying flutter run onto an Android device.

The solution for this would be to change the DNS address of your network to 8.8.8.8(Google's DNS) or any other address:

MacOSX:

  1. Open "System Preferences"

  2. Click on "Network"

  3. Select the network which your computer is connected and click on "Advanced"

  4. Select "DNS", Select the "+" button, type "8.8.8.8" (Google's DNS) or if you prefer OpenDNS, "208.67.222.222"

  5. Select "Ok" and "Apply"

Windows & Linux: https://developers.google.com/speed/public-dns/docs/using

After this reopen the terminal and try again.

Share:
7,736
Admin
Author by

Admin

Updated on December 18, 2022

Comments

  • Admin
    Admin over 1 year

    Could not resolve URL "https://pub.dartlang.org". Error (69): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

    that is the error in flutter when i create or upgrade flutter:

    that is the error in flutter when i create or upgrade flutter

  • jonasfj
    jonasfj over 3 years
    DO NOT ATTEMPT THIS! dartlang-pub-dev.appspot.com is a staging site for the development of pub.dev, it contains outdated data, and will be taken offline from time to time.