Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml

后端 未结 18 891
野性不改
野性不改 2020-11-27 15:49

After solving a JDK zero value error, now I\'m facing this one. I did a little research, but it seems I can\'t get to the point. Here is the log error:

FATA         


        
18条回答
  •  心在旅途
    2020-11-27 16:25

    IF you're using Gradle Plugin 2.0, you need to make changes in your gradle:

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

    If you are using Gradle 1.5 you’ll use instead of previus:

    // Gradle Plugin 1.5  
     android {  
       defaultConfig {  
         // Stops the Gradle plugin's automatic rasterization of vectors
         generatedDensities = []  
      }  
      // Flag to tell aapt to keep the attribute ids around
      // This is handled for you by the 2.0+ Gradle Plugin  
      aaptOptions {  
        additionalParameters "--no-version-vectors"  
      }  
     }  
    

    Check also: Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17 tag requires viewportWidth > 0.

    Android Support Library Ref.: Support Vector Drawables and Animated Vector Drawables.

    Also update Android Support dependencies from

    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    

    to

    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:recyclerview-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.2.0'
    

    as you're already using build-tools in version of 24.0.2.

提交回复
热议问题