2015-10-14 87 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