美文网首页bug收集
BUG - A problem was found with t

BUG - A problem was found with t

作者: Candy有雪吃 | 来源:发表于2018-12-19 15:56 被阅读0次
    Error:A problem was found with the configuration of task ':app:packageRelease'.File ' > F:\AndroidStudioProjects\sun\SunshineCarLife\app\build\intermediates\res\resources-release-stripped.ap_' > specified for property 'resourceFile' does not exist.
    

    解决方案:

    release {
                // 不显示Log, 在java代码中的调用方式为:BuildConfig.LOG_DEBUG
                buildConfigField "boolean", "LEO_DEBUG", "false"
                //开启混淆
                minifyEnabled true
                //打包时会删除没有用到的资源
                shrinkResources false  //改为false 就解决了
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.config
            }
    

    出现此类问题的原因是 :

    AS 2.2后minifyEnabled=true时包含了shrinkResources=true,即混淆时会自动去掉多余资源,所以我们不需要设置shrinkResources了。

    相关文章

      网友评论

        本文标题:BUG - A problem was found with t

        本文链接:https://www.haomeiwen.com/subject/zopjkqtx.html