1.使用最新(2.3.0版gradle)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.+'
}
}
apply plugin: 'com.android.library'
dependencies {
//单文件依赖
compile files("libs/xUtils-2.6.14.jar")
//某个文件夹下面全部依赖
//compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 19
buildToolsVersion "20"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
lintOptions {
abortOnError false
}
instrumentTest.setRoot('tests')
}
}