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,用记事本或者类似的编辑器打开,输入以下内容
- allprojects{
- repositories {
- def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'
- all { ArtifactRepository repo ->
- if(repo instanceof MavenArtifactRepository){
- def url = repo.url.toString()
- if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) {
- project.logger.lifecycle "Repository ${repo.url} replaced by $REPOSITORY_URL."
- remove repo
- }
- }
- }
- maven {
- url REPOSITORY_URL
- }
- }
- }