2016-09-26 48 views
6

Error:A problem was found with the configuration of task ':app:packageRelease'. File '/Volumes/Data/Android apps/NammaKarnataka-master/app/build/intermediates/res/resources-release-stripped.ap_' specified for property 'resourceFile' does not exist.錯誤,同時生成簽名的apk任務應用程序:packageRelease

當我嘗試生成Android Studio 2.2上簽名的apk時發生以下錯誤消息。
要解決此問題需要哪些附加信息?

+0

可能的複製 - http://stackoverflow.com/questions/36540676/build-intermediates-res-resources-anzhi-debug-stripped -ap-specified-for-prope –

+0

你可以發佈你的build.gradle文件嗎? – Nishith

+0

謝謝。設置「shrinkResources false」解決了這個問題。 –

回答

16

添加shrinkResources,設置爲false,到release條款:

buildTypes { 
    release { 
     signingConfig signingConfigs.release 
     minifyEnabled false 
     shrinkResources false //ADD THIS 
     zipAlignEnabled true 
     debuggable false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
相關問題