Gradle安装和配置

1、下载gradle

http://gradle.android-studio.org/

2、解压

3、配置环境变量。配置GRADLE_HOME到你的gradle根目录当中,然后把%GRADLE_HOME%/bin(linux或mac的是$GRADLE_HOME/bin)加到PATH的环境变量,配置完成之后,运行gradle -v,检查一下是否安装无误

4、AS配置gradle路径

 Settings >  Gradle >Gradle home path


5、SDK Manager升级开发库,android.support.Repository android.support.library

6、配置工程gradle和gradle plugin版本

project structure > project


Error:Could not download artifact 'com.android.tools.build:gradle-core:1.3.0:gradle-core.jar': No cached 
version available for offline mode

Error:Unable to load class 'org.codehaus.groovy.runtime.StringGroovyMethods'.
This is an unexpected error. Please file a bug containing the idea.log file.
<a href="fileBug">File a bug</a><br><a href="showLogFile">Show log file</a>

Error:Gradle version 2.10 is required. Current version is 1.12. If using the gradle wrapper, try editing 
the distributionUrl in C:\Users\TangLong\Downloads\ListViewDemo6\gradle\wrapper\gradle-wrapper.properties 
to gradle-2.10-all.zip.
Please fix the project's Gradle settings.
<a href="openGradleSettings">Gradle settings</a>

Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"


Error:(24, 13) Failed to resolve: com.android.support:appcompat-v7:23.0.1

<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile">Show in 
File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值