0

I have changed my appcompat library from version v7:21 to v7:19.1 i have fixed all the related issue and i downgraded the target sdk from 21 to 19 and every things worked but when i try to build to device i get No resource found error in app compact v7:21 which is located in

app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values-v21/values-v21.xml

i tried to clean the project my project and i used gradlew/clean with no success

my question if I'm using app compact v7:19 why i find app compact v7:21 in my exploded-arr folder?

this is my gradle

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion "19.1"
    defaultConfig {
        applicationId "appname"
        minSdkVersion 17
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"

        multiDexEnabled = true

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        preDexLibraries = false
    }
}
allprojects {
    repositories {
        mavenCentral()
        jcenter()
        maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':bounceScroller')
    compile project(':SwipeMenu')
    compile project(':indicator')
    compile project(':BetterSpinner')

    compile 'com.android.support:appcompat-v7:19.1.0'
    compile 'com.android.support:support-v4:19.1.0'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.easing:library:1.0.1@aar'
    compile 'com.daimajia.androidanimations:library:1.1.3@aar'
    compile 'com.edmodo:cropper:1.0.1'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.leocardz:aelv:1.1@aar'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.google.android.gms:play-services-ads:7.8.0'
    compile 'com.google.android.gms:play-services-identity:7.8.0'
    compile 'com.google.android.gms:play-services-gcm:7.8.0'

    compile 'com.android.support:multidex:1.0.0'
    compile 'com.creativeelites:androidexternalfilewriter:1.4'
    compile 'com.lifeofcoding:cacheutilslibrary:1.0.0@aar'
    compile 'com.google.code.gson:gson:2.2.2'
}
ligi
  • 39,001
  • 44
  • 144
  • 244
Antwan
  • 3,837
  • 9
  • 41
  • 62

1 Answers1

0

Sometimes gradle doesn't do what you would like it to - such as remove unused cached files if they are not in use on the project. Of course, those might be useful later, so...

Just delete the "intermediaries" folder. It will be recreated on your next build, and your build will take longer the first time you run it, but the problem should go away. You're essentially deleting the cache.

You may have other cached files that you need to remove as well, but that depends on settings in your environment.

EDIT:

You can also try to clear the gradle cache and the intermediaries folder. See this reference on how to clear cache.

How to clear gradle cache?

Community
  • 1
  • 1
Jim
  • 10,172
  • 1
  • 27
  • 36