通过菜单为Android studio设置代理,路径为file---setting---Appearance & Behavior---System Settings,设置完毕以后点ok
按照正常逻辑,同样的方法把代理去掉,点ok就取消代理了吧?
但是,事情没有你想的那么简单,取消以后出现错误
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
直觉感觉应该是代理没有关掉,搜索得知这里是个大坑,需要手动删除
C:\Users\你的用户名\.gradle\gradle.properties 文件里的配置信息系
记录下来,防止其他人踩坑不知道如何处理。