android - dl.google.com:443 未能响应
问题描述
得到错误
原因:dl.google.com:443 响应失败
下面是build.gradle
文件代码
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}}allprojects {
repositories {
google()
jcenter()
}}task clean(type: Delete) {
delete rootProject.buildDir}
和
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }
解决方案
编辑[user]/.gradle/gradle.properties文件,配置代理,像这样
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=1080
推荐阅读
- javascript - 表单提交在 ios 设备上不起作用
- rust - 使用 Serde 反序列化时如何忽略额外的元组项?(“尾随字符”错误)
- sharepoint-online - 难以让“列出组成员”在 Microsoft Flow 中返回正确的 Sharepoint 组信息
- ffmpeg - libx264 和 h264_nvenc 有什么区别?
- reactjs - 什么应该被视为 React 中的组件
- java - Spring 将 Autowired SessionAttribute 注入服务层
- excel - 为 Excel 电子表格插入小计
- javascript - 如何使用 CSS-Grid 和 javascript 制作图像幻灯片
- google-apps-script - 使用单独工作表中的宏清除单元格
- java - 有什么方法可以在paintComponent中获取参数吗?