> File '\app\build\intermediates\res\resources-release-stripped.ap_' specified for property 'resourceFile' does not exist.資源不存在,
buildTypes { release { minifyEnabled true shrinkResources false // 改爲false 就OK了 signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { minifyEnabled true shrinkResources false //改爲false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
解決方案:
出現的原因是:
AS 2.2後 minifyEnabled=true 時包含了shrinkResources=true,
即混淆時會自動去掉多餘資源,所以我們不需要設置shrinkResources了
2、如果在簽名時android studio報"Master password is required to unlock the password database.The password database will be unlocked during this session for all subsystems."
那麼直接點擊彈窗右下角的“Reset”按鈕,再輸入密碼和確認密碼就好了。
我這邊出現這個錯誤的原因是,兩套源碼, 同一個包名ID,想用同一個簽名打包,在新的項目上用的時候就提示密碼錯誤,然後 Reset 一下就好了。不放心,可以把 jks 備份一下,
3.
Error:Execution failed for task ‘:app:lintVitalRelease‘.
> Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
這個studio有直接給出解決辦法:
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}