尝试运行我的项目时出现以下构建错误

时间:2017-12-18 11:15:09

标签: android android-studio android-gradle

Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:font
Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

My Gradle文件如下所示:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
    applicationId "com.docnme.patientapp"
    minSdkVersion 17
    targetSdkVersion 25
    versionCode 22
    versionName "4.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

dexOptions {
    javaMaxHeapSize "4g"
}
}

repositories {
   maven { url "https://jitpack.io" }
}

repositories {
    jcenter()
    // or  mavenCentral()
    //mavenCentral()
}

configurations.all {

    resolutionStrategy {
        force 'com.android.support:design:25.3.1'
        //force 'com.android.support:support-v4:25.3.1'
        force 'com.android.support:appcompat-v7:25.3.1'
    }
}


dependencies {
    //compile fileTree(dir: 'libs', include: ['*.jar'])
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/PGSDK_V2.0.jar')

    compile 'com.android.volley:volley:1.0.0'
    //noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:percent:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'com.github.florent37:materialtextfield:1.0.5'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.5'
compile 'com.wang.avi:library:2.1.2'
compile 'com.github.klaszlo8207:StretchTopViewExample:a28637a23b'
compile 'com.android.support:multidex:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.appsflyer:af-android-sdk:4.+@aar'
compile 'joda-time:joda-time:2.9.4'
compile 'com.getbase:floatingactionbutton:1.10.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.deano2390:MaterialShowcaseView:1.1.0@aar'
testCompile 'junit:junit:4.12'
}

我从GitHub克隆了回购并尝试构建我的代码。它构建良好,但是当我尝试运行项目时,它会导致上面提到的错误。 我使用Gradle版本3.5和Android插件版本2.3.3

此外,从Manifest和gradle文件启用了multidex。

0 个答案:

没有答案