Android 构建添加外部库失败
Android build failed adding external library
我正在尝试根据 github 上的说明在我的项目中包含一个库,我在 build.gradle 文件中包含以下内容:
compile 'com.github.omadahealth.slidepager: slidepager: 2.2.4@aar'
但是我明白了
error
顶级构建文件
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
模块:应用构建文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.exampleapp"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.github.omadahealth.slidepager:slidepager:2.2.4@aar'
}
他们使用其他库,他们使用其他库依赖项,如果你添加
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.github.orangegangsters:library:1.3.4@aar'
compile 'com.github.omadahealth.slidepager:slidepager:2.2.4@aar'
你得到一个 Error:(91, 21) No resource found that matches the given name: attr 'tv_typeface'
.
我采样下载它们并添加到库中gradle?
我正在尝试根据 github 上的说明在我的项目中包含一个库,我在 build.gradle 文件中包含以下内容:
compile 'com.github.omadahealth.slidepager: slidepager: 2.2.4@aar'
但是我明白了 error
顶级构建文件
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
模块:应用构建文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.exampleapp"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.github.omadahealth.slidepager:slidepager:2.2.4@aar'
}
他们使用其他库,他们使用其他库依赖项,如果你添加
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.github.orangegangsters:library:1.3.4@aar'
compile 'com.github.omadahealth.slidepager:slidepager:2.2.4@aar'
你得到一个 Error:(91, 21) No resource found that matches the given name: attr 'tv_typeface'
.
我采样下载它们并添加到库中gradle?