Search code examples
androidgradleandroid-gradle-pluginstyles

Gradle build error styles attributes not found


I was try to upgrade android studio 2.3 to 3.0 but the gradle can't build and shows this message: Probably one of your libraries is expecting that style to be available and it's not finding it

please help me to fix this error.

screenshot of the error message

this is the build.gradle of the project

apply plugin: 'com.android.application'


repositories {
    maven {
        url 'https://repo1.maven.org/maven2/'
    }
}

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "com.skills.inuk"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "0.3.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true //important
        vectorDrawables.useSupportLibrary = true
    }

    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

    }

    packagingOptions {
        exclude 'LICENSE.txt'
    }
    lintOptions {
        abortOnError false
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    // compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support:design:26.0.1'
    compile 'com.jakewharton:butterknife:8.6.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.twitter.sdk.android:twitter:3+'
    compile 'com.google.android.gms:play-services:11.4.2'
    compile 'com.makeramen:roundedimageview:2.3.0'
    compile 'com.github.curioustechizen.android-ago:library:1.3.4'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'com.google.code.gson:gson:2.6.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
    compile 'com.android.support:support-v4:26.0.1'
    compile 'com.android.support:support-vector-drawable:26.0.1'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'com.android.support:multidex:1.0.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
}
apply plugin: 'com.google.gms.google-services'  

Thx for your reponses guys, i founded the probleme , this happening because :

Consider if you incorrectly include the symbol when accessing a resource from the android namespace, as shown below:

<!-- When referencing resources from the 'android' namespace, omit the '@' symbol. -->
<item name="@android:windowEnterAnimation"/>

Solution

  • Go to your gradle.properties write the below code and Sync your project

    android.enableAapt2=false
    

    And remove @ symbol because from Android Studio 3.0

    When referencing resources from the 'android' namespace, omit the '@' symbol.