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
8411

被折叠的 条评论
为什么被折叠?



