It is not working for me.
I created new empty project in AndroidStudio 1.2 Beta with this full
build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.marek.densitysplittest"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
splits {
density {
enable true
include 'tvdpi', '400dpi', '560dpi'
compatibleScreens 'xlarge'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
This is what is generated:
<https://lh3.googleusercontent.com/-0iSrrC-yHzk/VSw8wifiklI/AAAAAAAAOHw/ZmqrR4kFrbY/s1600/gradle.PNG>
There are no tvdpi, 400dpi and 560dpi apks. Also none of
AndroidManifest.xml file under build/intermediates/manifests/density/<dpi>
contains <compatible-screens> with screenDensity="560" etc. If I publish
those apks to google play they won't be available for nexus 6 without it.
If I try with reset() and then include for example 'xxxhdpi' and '560dpi'
only xxxhdpi apk is created.
W dniu poniedziałek, 13 kwietnia 2015 21:44:37 UTC+2 użytkownik Xavier
Ducrohet napisał:
>
> These values are not used by default because they are not recommended, but
> you can add them.
>
> splits {
> density {
> enable true include 'tvdpi', '400dpi', 560dpi'
> compatibleScreens 'small', 'normal', 'large', 'xlarge'
> }
>
>
>
>
> On Mon, Apr 13, 2015 at 11:41 AM, Marek Bachorski <[email protected]
> <javascript:>> wrote:
>
>> Hi,
>>
>> my application uses gradle density split but it is not generating
>> compatible-screens tag for tvdpi, 400dpi and 560dpi.
>>
>> This my density split part of build.gradle:
>>
>> splits {
>> density {
>> enable true
>> compatibleScreens 'small', 'normal', 'large', 'xlarge'
>> }
>>
>> Is generates apks for: ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi with
>> different version codes and I upload them all to google play.
>>
>> I have decompiled all of generated apk's but none of them has following
>> piece of code that as far as I know is necessary:
>>
>> <compatible-screens>
>> <screen
>> android:screenDensity="560"
>> android:screenSize="large" />
>> <screen
>> android:screenDensity="560"
>> android:screenSize="small" />
>> <screen
>> android:screenDensity="560"
>> android:screenSize="normal" />
>> <screen
>> android:screenDensity="560"
>> android:screenSize="xlarge" />
>> </compatible-screens>
>>
>>
>>
>> Is it a bug or am I doing something wrong?
>>
>> Because it seems that if we use density splits we do not support tvdpi,
>> 400dpi and 560dpi devices on google play.
>>
>>
>>
>> I tried adding images to drawable-560 folder and icon to mipmap-xxxhdpi and
>> mipmap-xxhdpi but it didn't help.
>>
>> For testing I created new empty project in Android Studio 1.2b with build
>> tools 21.1.2, compile with sdk 21 and gradle version is 1.1.0.
>>
>> I also tried with older versions and with reset() and include.
>>
>>
>>
>> I will be grateful for any help you can provide,
>>
>> Marek Bachorski
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks!
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.