魅力程序猿

  • 首页
  • Java
  • Android
  • APP
    • 扑克计分器
    • Video Wallpaper
  • 联系我
  • 关于我
  • 资助
道子
向阳而生
  1. 首页
  2. Android
  3. 正文

解决specified for property 'resourceFile' does not exist.

2016年12月11日 9826点热度 0人点赞 3条评论

进行运行Debug包遇到这问题,很是郁闷:

Error:A problem was found with the configuration of task ':packageDebug'. > File 'D:\AndroidWork\zzmobile\myproject\build\intermediates\res\resources-debug-stripped.ap_' specified for property 'resourceFile' does not exist.

最后找到了解决问题的方案:

关闭Debug模式下的混淆开关和移除无用资源开关,如下所示:

我本地的大致如下,开启了混淆

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

关闭debug模式下的混淆开关和移除无用资源开关,即将minifyEnabled true改为minifyEnabled false,shrinkResources true改为shrinkResources false 即可

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

最后重新编译即可

如果有其他方案也可以贴出来大家一起交流哦!

 

标签: 解决specified for property 'resourceFile' does not exist.
最后更新:2016年12月11日

daozi

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

  • Roxanna

    Niin voitteko kertoa miten tämä liittyy tehotuotantoon muuten kuin rehun osmhla?Salaoneltalan ei ole terveelle ihmiselle vaarallinen ja se hoidetaan antibiooteilla (onko se sitten hyvä että käyttää antibiotteja on toinen juttu) ja salmonella kuolee kun sitä kuumentaa. En siis ymmärrä tätä vouhkausta asiasta. Ja ei, en väitä että tämä epidemia on yhdentekevä tai että salmonella tervetuloa tai että tehotuotanto rocks (koska it sucks). Minusta tämä vaan on saanut suhteettomat mittasuhteet tämä asia. Ehkä en tiedä jotain oleellista tai en ymmärrä sitä.

    2016年12月18日
    回复
  • Jetson

    It's a pluraese to find someone who can identify the issues so clearly

    2016年12月19日
    回复
  • Carmella

    Thanks for finally talking about >解决specified for property resourceFile does not exist.
    - 魅力程序猿 <Liked it!

    2017年5月10日
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复
    搜索
    联系方式

    QQ群:179730949
    QQ群:114559024
    欢迎您加入Android大家庭
    本人QQ:136049925

    赐我一丝安慰
    给我一点鼓励

    COPYRIGHT © 2023 魅力程序猿. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    豫ICP备15000477号