android pulltorefresh gradle,Pulltorefresh add to gradle

I've succesfully imported the libproject in Android Studio 1.0. The steps are the following

1.- Download and install PullToRefresh from the official GitHub. Unzip it. 2.- Create an empty Android Studio project. Mine is named "PrjLibDeps" 3.- In project's root folder, create a folder named "libs". Inside libs/, copy a "pulltorefresh" folder containing the unzipped file. Structure remains as shown below: PrjLibdeps | settings.gradle | build.gradle | libs | pulltorefresh | src, res, LICENSE, pom.xml... | app/ | build.gradle | src | ...

4.- Create a build.gradle file inside "pulltorefresh" folder. Copy-paste this sample code and set proper values to compileSdkVersion, buildToolsVersion, minSdkVersion, targetSdkVersion (just copy them from app/build.gradle) apply plugin: 'com.android.library' dependencies { compile 'com.android.support:support-v4:21.0.3' } android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { minSdkVersion 9 targetSdkVersion 20 } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] res.srcDirs = ['res'] } } }

5.- on app/build.gradle dependencies { compile project(":PullToRefresh") }

6.- Now, on project_root/settings.gradle: include ‘:app', ':PullToRefresh' project (':PullToRefresh').projectDir = new File('libs/pulltorefresh')

7.- "Sync now" 8.- CMD+F9 (Make project)

Hope it helps! more detailed info in my blog

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值