2015-10-14 85 views
0

我已经改变了我的appcompat库从版本v7:21到v7:19.1 我已经修复了所有相关问题,并将目标sdk从21降级到19,我尝试建立到设备我得到 没有资源发现应用紧凑V7错误:21,位于没有资源后降级应用程序版本

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

我试图清理项目,我的项目,我用gradlew/clean没有成功

我问题,如果我使用应用程序压缩v7:19为什么我找到应用程序紧凑型v7:21在我的爆炸arr文件夹中?

这是我的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:[email protected]' 
    compile 'com.daimajia.androidanimations:library:[email protected]' 
    compile 'com.edmodo:cropper:1.0.1' 
    compile 'com.github.bumptech.glide:glide:3.6.1' 
    compile 'com.leocardz:aelv:[email protected]' 
    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:[email protected]' 
    compile 'com.google.code.gson:gson:2.2.2' 
} 

回答

0

的gradle有时不这样做,你将它想什么 - 比如删除未使用的缓存文件,如果他们没有在项目中使用。当然,以后可能会有用,所以...

只需删除“媒介”文件夹。它会在您的下一个版本中重新创建,并且在您第一次运行它时需要更长的时间,但问题应该消失。你基本上删除缓存。

您可能还有其他需要删除的缓存文件,但这取决于您环境中的设置。

编辑:

您也可以尝试清除缓存的gradle和中介机构的文件夹。请参阅此参考资料,了解如何清除缓存。

How to clear gradle cache?

+0

我已经删除了他们,但他们重新 – Tony

+0

我编辑我的回应。希望它有帮助 – Jim

+0

感谢@jim为我的回应,但我试过你的解决方案没有运气:( – Tony