通過菜單為Android studio設(shè)置代理逮刨,路徑為file---setting---Appearance & Behavior---System Settings鳍徽,設(shè)置完畢以后點(diǎn)ok
按照正常邏輯陨亡,同樣的方法把代理去掉,點(diǎn)ok就取消代理了吧?
但是死姚,事情沒有你想的那么簡(jiǎn)單刷钢,取消以后出現(xiàn)錯(cuò)誤
2021-05-19T14:44:10.097+0800 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connection established 192.168.1.6:1254<->45.129.39.130:8118
2021-05-19T14:44:10.570+0800 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-730: Close connection
2021-05-19T14:44:10.571+0800 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] CONNECT refused by proxy: HTTP/1.1 403 Request blocked by Privoxy
2021-05-19T14:44:10.571+0800 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection discarded
2021-05-19T14:44:10.571+0800 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 730][route: {tls}->http://fodev.org:8118->https://maven.aliyun.com:443][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 20]
2021-05-19T14:44:10.571+0800 [INFO] [org.gradle.internal.resource.transport.http.HttpClientHelper] Failed to get resource: HEAD. [HTTP HTTP/1.1 403 Request blocked by Privoxy: https://maven.aliyun.com/repository/jcenter/androidx/lifecycle/lifecycle-runtime/2.1.0/lifecycle-runtime-2.1.0.pom)]
2021-05-19T14:44:10.572+0800 [LIFECYCLE] [org.gradle.internal.operations.DefaultBuildOperationRunner]
2021-05-19T14:44:10.572+0800 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Metadata of https://maven.aliyun.com/repository/jcenter/androidx/lifecycle/lifecycle-runtime/2.1.0/lifecycle-runtime-2.1.0.pom'
2021-05-19T14:44:10.578+0800 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build
直覺感覺應(yīng)該是代理沒有關(guān)掉笋颤,搜索得知這里是個(gè)大坑,需要手動(dòng)刪除
C:\Users\你的用戶名\.gradle\gradle.properties 文件里的配置信息系
記錄下來(lái)内地,防止其他人踩坑不知道如何處理伴澄。