Jos*_*mez 11 android android-resources android-gradle-plugin
由于使用gradle插件1.3.0在发布模式下构建我的应用程序时出现问题,我已切换到1.4.0(beta 2),修复了所述构建问题.
但是,虽然某些风格构建完美,但其他风格的构建已中止,并显示以下错误消息:
无法使用SDK构建工具21或更高版本过滤多个密度的资产.请考虑使用apk拆分.
我没有找到任何关于上述句子的参考,我应该如何处理这些风格的资源,或者甚至为什么这个错误只出现在几种风格而不是所有风格中.
编辑:build.gradle
apply plugin: 'com.android.application'
android {
    signingConfigs {
        config {
        }
    }
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.example.appname"
        minSdkVersion 8
        targetSdkVersion 23
        versionCode 1
        versionName '0.0.1'
    }
    buildTypes {
        release {
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            minifyEnabled true
            zipAlignEnabled true
            signingConfig signingConfigs.config
        }
        debug {
            applicationIdSuffix 'debug'
            versionNameSuffix '_debug'
        }
    }
    flavorDimensions "googleplay"
    productFlavors {
        noplay {
            dimension "googleplay"
            versionCode Integer.parseInt(defaultConfig.versionCode + "0")
            buildConfigField "boolean", "HAS_GOOGLE_PLAY", "false"
            resConfigs "ldpi", "mdpi"
            // so far we are using the noplay flavor only for old devices, which do not have hidpi
        }
        play {
            dimension "googleplay"
            versionCode Integer.parseInt(defaultConfig.versionCode + "1")
            buildConfigField "boolean", "HAS_GOOGLE_PLAY", "true"
            minSdkVersion 9
        }
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    // Google Play services (analytics)
    playCompile 'com.google.android.gms:play-services-analytics:8.1.0'
    // ActionBar and support libraries
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
}
| 归档时间: | 
 | 
| 查看次数: | 2775 次 | 
| 最近记录: |