android -\build\intermediates\res\resources-anzhi-debug-stripped.ap _' specified for property ' resourceFile' 不存在

标签 android android-gradle-plugin android-studio-2.2 android-gradle-2.2

我将 Android Studio 更新到了 2.0 版。构建失败,而且构建时间也比 Android Studio 1.5 版要长。每次我运行我的应用程序时,我都会清理并重新加载项目,但这没有用。错误信息是:

\build\intermediates\res\resources-anzhi-debug-stripped.ap_' specified for property 'resourceFile' does not exist.

最佳答案

遇到同样的问题! 所以即时运行与shrinkResources不兼容

1) 如果使用 Android Studio 2.2

shrinkResources 错误

buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        shrinkResources false
        zipAlignEnabled true
        debuggable false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

2) 如果使用 Android Studio 2.0

  • 开启设置

  • Follow this image

  • 现在运行您的项目

关于android -\build\intermediates\res\resources-anzhi-debug-stripped.ap _' specified for property ' resourceFile' 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36540676/

相关文章:

java - 将数据插入SQLite数据库,数据类型不匹配

android - 指定的子项已有父项。您必须先在子项的父级上调用 removeView()——动态添加按钮时出现此错误

android - 为 materialDatePicker 设置 180 天的日历限制

java - 错误:Process 'command '/usr/local/android-studio/jre/bin/java'' finished with non-zero exit value 2

android - 降级lib时出现问题,它会一直缓存并崩溃

android-studio - Android Studio-启动时自动Gradle同步

android - 在运行时通过主内存中包含的 XML 字符串更改 Activity 的布局

java - Android Studio 2.0 - NoSuchAlgorithmException : SHA256WITHDSA Signature not available

用于调试构建的 Android Studio APK 分析器

android - 在 Android Studio 的数据绑定(bind)库中找不到 setHandler 的符号方法