Android Gradle 2.5如何让resConfigs“nodpi”工作

时间:2016-03-30 11:03:24

标签: android build.gradle

Gradle 2.5,[resourceConfigurations<< “恩”; “在-RID”; “ID”; “TH”; ]没关系,但是当我尝试设置[resourceConfigurations<< “nodpi”; “华电国际”; “xhdpi”; “xxhdpi”; “xxxhdpi”;],它显示[当在工具21及更高版本中使用拆分时,resConfigs不应包含任何密度。现在,它包含“nodpi”   建议:从build.gradle中的resConfigs中删除这些,我只想压缩apk所需的资源

1 个答案:

答案 0 :(得分:0)

Try removing the resConfigs "nodpi" line from your build.gradle file. It should be somewhere around here:

android {
    ...
    compileSdkVersion 23
    buildToolsVersion '23.0.2'
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 23
        resConfigs "nodpi" <--- REMOVE THIS LINE
        ...
    }
    ...
}