Update support library 23.2.0 build bug

前端 未结 10 1191
攒了一身酷
攒了一身酷 2020-11-30 07:53

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\\de

10条回答
  •  孤街浪徒
    2020-11-30 08:40

    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

提交回复
热议问题