> 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
}
}