Flofloaud1034
Flofloaud1034

Reputation: 388

Update support library 23.2.0 build bug

I have update the support library to 23.2.0 Since the update I get this error at build time :

\app\build\intermediates\data-binding-layout-out\debug\values-v11\values-v11.xml Error:(67, 54) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').

Have you encounter this problem ?

Upvotes: 17

Views: 10386

Answers (10)

Paul Woitaschek
Paul Woitaschek

Reputation: 6807

It was renamed a few times: Currently from version 24.0.0 on it's

R.drawable.abc_ic_ab_back_material

Previous versions:

23.2.1 R.drawable.abc_ic_ab_back_mtrl_am_alpha
23.2.0 R.drawable.abc_ic_ab_back_material

Upvotes: 26

amiron
amiron

Reputation: 731

Add in repository your project: res/drawable new vector data abc_ic_ab_back_mtrl_am_alpha.

enter image description here

Upvotes: 3

Imene Noomene
Imene Noomene

Reputation: 3053

I had the same problem using the support Library 23.2.0 with the buildToolsVersion 23.0.2 and classpath com.android.tools.build:gradle:1.5.0. So, I solved it by changing the distributionUrl in the gradle-wrapper.properties file from https://services.gradle.org/distributions/gradle-2.2.1-all.zip to https://services.gradle.org/distributions/gradle-2.14.1-all.zip .

Upvotes: 0

Georgian Benetatos
Georgian Benetatos

Reputation: 728

Check if any third party library is having this error, I had to update version of affolestad material dialog.

Upvotes: 1

Jacob Ras
Jacob Ras

Reputation: 5969

I had the same problem when using the latest Material Dialogs (0.8.5.6) with the latest Support Library (23.2). Reverting to Material Dialogs 0.8.5.1 with Support Library 23.1.1 works on Android 4.

Bug report on Material Dialog's GitHub: https://github.com/afollestad/material-dialogs/issues/983.

Upvotes: 1

Sayem
Sayem

Reputation: 5011

I think Google is converting Drawable to Vector Drawable from Android Support Library 23.2 as there is back port support in it.

For this they removed @drawable/abc_ic_ab_back_mtrl_am_alpha in Android Support Library 23.2& added a vector drawable named R.drawable.abc_ic_ab_back_material

Solution:

Add support for Vector drawable

// Gradle Plugin 2.0+  
android {
defaultConfig {
    vectorDrawables.useSupportLibrary = true
  }
}
// Gradle Plugin 1.5  


android {  
   defaultConfig {  
     generatedDensities = []  
  }  

  // This is handled for you by the 2.0+ Gradle Plugin  
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }  
 } 

Replace abc_ic_ab_back_mtrl_am_alpha to abc_ic_ab_back_material

Links:

http://android-developers.blogspot.co.uk/2016/02/android-support-library-232.html

https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=201835

https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.uws2k5j4j

Upvotes: 3

Flofloaud1034
Flofloaud1034

Reputation: 388

i have tested this solution and work for me

Upvotes: 1

mohax
mohax

Reputation: 4585

Faced same bug. In my case problem was in 3rd-party library, that I didn't update to the version, that use same app-compat vesrion as depency as in my project.

So try to update another libs, that use app-compat lib as depency.

Upvotes: 0

BuffMcBigHuge
BuffMcBigHuge

Reputation: 636

I solved this error by strictly declaring the previous AppCompat:

compile 'com.android.support:appcompat-v7:23.1'

Upvotes: 1

Zielony
Zielony

Reputation: 16537

This resource has been removed. See: https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.b1pysvcvl

Setting this flag should help:

android {
  defaultConfig {
    vectorDrawables.useSupportLibrary = true
  }
}

If you have not updated yet, and are using v1.5.0 or below of the Gradle plugin, you need to add the following to your app’s build.gradle:

android {
  defaultConfig {
    // Stops the Gradle plugin’s automatic rasterization of vectors
    generatedDensities = []
  }
  // Flag to tell aapt to keep the attribute ids around
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }
}

Upvotes: 10

Related Questions