Android studio fluent proxy settings

Time:2022-6-4

premise

When installing flutter for the first time, the agent settings are used to speed up the installation of the first update data, but the classpath cannot be found when adding devices and starting packaging and compiling

1. when the IDE is started for the first time, you will be prompted to update various SDK packages. At this time, the proxy is usually set directly. My system is ubuntu18.04, so the local VPN is directly proxy, 127.0.0.1 port 1080

2. when compiling and packaging, the relevant package cannot be found because the Google path package is used in the three default configurations of fluent

Switch Maven package source to domestic Ali source

In android/build Gradle is replaced by

//        google()
//        jcenter()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }

Switch the fluent SDK package source to the domestic Ali source

Flutter installation path

vim /home/elinx/web/tools/flutter/packages/flutter_tools/gradle/flutter.gradle

//        google()
//        jcenter()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }

Close ide global proxy: settings – > search proxy

Close the local global proxy generated by the IDE itself (this is the final proxy usage configuration inside the IDE)

My local path: vim gradle/gradle. properties

Comment all agents and ports

systemProp.https.nonProxyHosts=192.168.*,*.test
#systemProp.https.proxyPort=1080
#systemProp.http.proxyHost=127.0.0.1
systemProp.http.nonProxyHosts=192.168.*,*.test
#systemProp.https.proxyHost=127.0.0.1
#systemProp.http.proxyPort=1080