Wednesday, 9 September 2015

Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\lucky10021992\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe package -f --no-crunch -I C:\Users\lucky10021992\AppData\Local\Android\sdk\platforms\android-22\android.jar -M C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\res\debug -A C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\assets\debug -m -J C:\Users\lucky10021992\Desktop\Split\app\build\generated\source\r\debug -F C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.example.lucky10021992.split -0 apk --output-text-symbols C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\symbols\debug Error Code: 1 Output: C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\res\debug\values-v23\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. C:\Users\lucky10021992\Desktop\Split\app\build\intermediates\res\debug\values-v23\values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

Compare the two build.gradle (Module:app) 

Newly created Project Build.Gradle(Module:app)
apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.newProject"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.3'
}
Previous Project Build.Gradle(Module:app)
apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.example.previousProject"
        minSdkVersion 11
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
}
  • Replace all redSelected with previous project Build.Gradle
  • Sync project and build project
It works for me try it.

No comments:

Post a Comment