Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter build is still using an obsolete proxy address

Once I tried to build using a proxy. Later whenever I try to rebuild the app using no or a different proxy it still wants to connect using the old proxy:

Connect to 127.0.0.1:9666 [/127.0.0.1] failed: Connection refused: connect

Error details Notes:

  • I've already cleared Flutter and Android Studio caches
  • Flutter packages are working perfectly
  • It throws when gradle is participating
  • Proxy settings in Android Studio is set to auto
  • Gradle plugins are updated to the latest version
  • My gradle.properties file doesn't contain any proxy related configuration

Thanks!

like image 878
Mehran Khazaeizadeh Avatar asked Dec 01 '25 04:12

Mehran Khazaeizadeh


1 Answers

I've found the solution:

Since the problem was happening for all of the projects, I would investigate the global gradle settings file named gradle.properties located at USER_HOME/.gradle directory.

After commenting/removing proxy related lines everything fixed:

# systemProp.http.proxyHost=127.0.0.1
# systemProp.https.proxyPort=9666
# systemProp.https.proxyHost=127.0.0.1
# systemProp.http.proxyPort=9666
like image 95
Mehran Khazaeizadeh Avatar answered Dec 02 '25 22:12

Mehran Khazaeizadeh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!