新人配置环境时,一直到这一步就不行了 我是离线下载gradle-4.6的,已经手动配置在C盘用户的.gradle下了,编译时还是出现Connection timed out: connect。网络换了好几个了,防火墙也关了,还是这样子。真的不知道怎么回事,快疯了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把下面内容添加到你的项目gradle中// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0'// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url "https://jitpack.io" } jcenter() google() }}task clean(type: Delete) { delete rootProject.buildDir}//ext {// sdkVersion = 27// supportLibVersion = '26.1.0'//} 你不要手动配置,直接使用AS 自动配置,从github.com 随便下载一个android 项目,然后打开之后让android 自动配置你的gradle,然后再打开你的项目,如果还有问题,那么可能就不是你的gradle文件而是你的项目配置问题了,花不了几分钟,试试吧 WebView获取 网页内容 求一个好人帮我看俩个程序 怎样在我的应用中关闭音乐播放器? 基于Android平台智能手机Web应用信息推送系统的设计 import com.android.common.Search出错 Android RelativeLayout android 在线更新功能,如果设备没有 SD 卡,更新时下载的 apk 该存放在哪个路径下? 关于小米推送的开发问题(它是不是可以在应用没启动的情况下也接受推送?) 如何获取APP中的页面 安卓开发新浪微博项目遇到问题 蓝牙文件传输原理 请教Handler如何传入变量
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url "https://jitpack.io" }
jcenter()
google()
}
}task clean(type: Delete) {
delete rootProject.buildDir
}//ext {
// sdkVersion = 27
// supportLibVersion = '26.1.0'
//}