2018之android环境搭建,编译

android 环境,因为国内被墙, 搭起来非常费劲。怀念外企的时光啊

1. 下载最新的android studio3, sdk, gradle

http://android-studio.org/

2. Android SDK 在线更新镜像服务器资源

http://ask.android-studio.org/?/article/34

测试 东软和清华的可用:

http://mirrors.neusoft.edu.cn 端口:80

https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/

3. 尝试编译 walleth:

https://github.com/walleth/walleth

4. 使用aliyun的maven库:

 

 

 

 

 

转: http://blog.csdn.net/luman1991/article/details/55510986

 

找到gradle的配置文件路径,例如Windows中的路径为C:\Users\${你的用户名}\.gradle

新建一个文件名为init.gradle,用记事本或者类似的编辑器打开,输入以下内容

 

[java] view plain copy
 
  1. allprojects{  
  2.   repositories {  
  3.     def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'  
  4.       all { ArtifactRepository repo ->  
  5.         if(repo instanceof MavenArtifactRepository){  
  6.           def url = repo.url.toString()  
  7.           if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) {  
  8.             project.logger.lifecycle "Repository ${repo.url} replaced by $REPOSITORY_URL."  
  9.             remove repo  
  10.           }  
  11.        }  
  12.     }  
  13.     maven {  
  14.       url REPOSITORY_URL  
  15.     }  
  16.   }  
  17. }  

 

posted @ 2018-01-15 10:30  brayden  阅读(761)  评论(0编辑  收藏  举报