Completely from scratch created a project, and when I make some selections, it is not allocated as it should. Moreover, such a problem is only on devices below 21 api and only new projects. Ie old (created a few months ago) projects are working fine, but new ones are already with such nonsense. Began to verify the old and new project, all versions of libraries are the same. There is almost nothing in styles either. Can anyone come across this already?

enter image description here

apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' def versionMajor = 1 def versionMinor = 0 def versionPatch = 0 android { compileSdkVersion 23 buildToolsVersion "23.0.3" dexOptions { maxProcessCount 4 javaMaxHeapSize "2g" } packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } defaultConfig { applicationId "com.company.example" minSdkVersion 14 targetSdkVersion 23 versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch versionName "${versionMajor}.${versionMinor}.${versionPatch}" } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { debuggable true } } dataBinding { enabled = false } lintOptions { abortOnError true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:design:23.4.0' compile 'com.larswerkman:HoloColorPicker:1.5' } 

Gradle project

 buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.0-alpha3' classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4' } } allprojects { repositories { mavenCentral() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } 
  • Add build.gradle to the question. Most likely the matter is in some beta versions of something. For example version gradle. Or build-tools - YuriySPb
  • Yes, it seems to be nothing. added gradle. I’ll add that I ’m using Android Studio 2.2 Preview 3 - AndXor
  • And in the project level file, which version of the gradle itself is used? - Yuriy SPb
  • added gradle project - AndXor

1 answer 1

Apparently the case in alpha gradle.

Change in build.gradle project level version to a stable instead of alpha. Those.

  classpath 'com.android.tools.build:gradle:2.1.2' 

instead of classpath 'com.android.tools.build:gradle:2.2.0-alpha3'