android - Cannot filter assets for multiple densities using SDK build tools 21 or later -


due issue building application in release mode gradle plugin 1.3.0, have switched 1.4.0 (beta 2), fixes said build issue.

however, whereas flavors build perfectly, others have build aborted following error message:

cannot filter assets multiple densities using sdk build tools 21 or later. consider using apk splits instead.

i haven't found reference sentence above, should resources of these flavors, or why error appears in couple of flavors , not in of them.

edit: 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"             // far using noplay flavor old devices, 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 , support libraries     compile 'com.android.support:appcompat-v7:23.0.1'     compile 'com.android.support:support-v4:23.0.1' } 

resconfigs replaced apk splits densities , architectures. note following sentence:

when using build tools older 21 add resconfigs "nodpi", "hdpi" limit density folders packaged. instead, use apk splits provide different apks devices different densities.

there bug report issue.

the offending resconfigs have removed, , apk splits can used in instead.

alternatively, switching build-tool 20.0.0 seems work around problem.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -