最近电脑重装系统了,下载了AS,新建工程却总是没办法同步成功,后面把build.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 { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/central/'}        google()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.4.0'        // 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/' }        jcenter { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/central/'}        google()    }}task clean(type: Delete) {    delete rootProject.buildDir}

 

更多相关文章

  1. Android(安卓)Studio Rendering Problems
  2. Eclipse配置NDK编译Android工程
  3. Ant编译编译APK、打包打包JS
  4. Android(安卓)Studio 出现 error: cannot find symbol variable
  5. 搭建环境变量时遇到的三个错误
  6. 最新版本(OpenSSL1.0.1e)libssl.so, libcrypto.so for Android
  7. Unity3d调用Anroid(Android(安卓)Studio环境)方法
  8. Android(安卓)问题之找不到资源解决办法
  9. [置顶] Android更换皮肤

随机推荐

  1. Android操作HTTP实现与服务器通信
  2. Android之国际化
  3. Android(安卓)Asynchronous Http Client-
  4. android每日一问【2011-09-19】
  5. 优秀的android开源项目
  6. android 如何使用Parcelable接口
  7. 转载:Android(安卓)获取ROOT权限原理解析
  8. android 签名
  9. android 笔记 --- Android界面刷新的方法
  10. Android(安卓)数据库SQLite的使用简单Dem