0

Can anyone help me to resolve this issue. the project was working fine in old version. thanks in advance. please do help me. I googled and tried many ways but not getting sucess error shows like this

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
Error:resource 

    android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
    Error:resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
    Error:failed linking references.
    Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    Error:Execution failed for task ':app:processDebugResources'.
    > Failed to execute aapt
    Information:BUILD FAILED in 44s
    Information:7 errors
    Information:0 warnings
    Information:See complete output in console

gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    defaultConfig {
        applicationId "com.example.chippy.entekottayam"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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


    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.google.android.gms:play-services:11.4.2'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.android.gms:play-services-appindexing:9.8.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

Can anyone help me to resolve this issue. the project was working fine in old version. thanks in advance. please do help me. I googled and tried many ways but not getting sucess

MMG
  • 3,226
  • 5
  • 16
  • 43
  • can you please add project level dependencies , I mean your build.gradle(project) @prince cherian – Wubbalubbadubdub Nov 13 '17 at 16:57
  • possible that it is your versions not matching your build tools, see: https://stackoverflow.com/questions/32075498/error-retrieving-parent-for-item-no-resource-found-that-matches-the-given-name – user3802077 Nov 13 '17 at 17:26

2 Answers2

0

This could also be caused by missing the "@" symbol in the reference to the style, for example doing "android:style/TextAppearance.Material.Widget.Button.Borderless.Colored" instead of "@android:style/TextAppearance.Material.Widget.Button.Borderless.Colored".

AAPT would ignore such mistakes and then your app could run into issues during runtime, AAPT2 catches these mistakes early on during compilation.

Izabela Orlowska
  • 7,431
  • 2
  • 20
  • 33
0

Hi I'm using Android Studio 3 and had this error Error:resource style/Base.V26.Theme.AppCompat.Light (aka XXX.XXX.XXX.XXX:style/Base.V26.Theme.AppCompat.Light) not found. I still cannot quite figure out what caused the error, it started appearing after I plugged in my physical device (phone) and wanted to debug an app I am writing on the device. It took me hours experimenting. The error was strangely so pervasive that I could not create new projects (even totally empty new projects, importing samples, ...) without getting this error. What fixed it for me (I am writing here for my own reference also) was to go into the menu Build / Edit build types / Properties (tab) and set Compile SDK Version to the same value as Build tools version (27 in my case) and also fiddle around with these settings in the Flavors tab and play around with Min Sdk Version vs. Target Sdk Version. Also bear in mind that this is Nov 2017 (because I found many answers related to different versions of Android Studio and Eclipse which were not at all applicable for my setup).

mxl
  • 69
  • 1
  • 3