Issue
Hi i am trying to use a Vector drawable to draw a fingerprint icon from the example xml from android dev website and i get an errior saying it cant find any of the attributes set on this drawable.
below is the code:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="40.0dp"
android:height="40.0dp"
android:viewportWidth="40.0"
android:viewportHeight="40.0">
<path
android:pathData="M20.0,20.0m-20.0,0.0a20.0,20.0 0.0,1.0 1.0,40.0 0.0a20.0,20.0 0.0,1.0 1.0,-40.0 0.0"
android:fillColor="#009688"/>
<path
android:pathData="M11.2,21.41l1.63,-1.619999 4.17,4.169998 10.59,-10.589999 1.619999,1.63 -12.209999,12.209999z"
android:fillColor="#FFFFFF"/>
</vector>
My Min and compiledSdk is set to 19 :
errors i get when i try to do a clean/rebuild:
Error:(17) No resource identifier found for attribute 'viewportWidth' in package 'android'
Error:(17) No resource identifier found for attribute 'viewportHeight' in package 'android'
Error:(22) No resource identifier found for attribute 'pathData' in package 'android'
Error:(22) No resource identifier found for attribute 'fillColor' in package 'android'
Error:(25) No resource identifier found for attribute 'pathData' in package 'android'
Error:(25) No resource identifier found for attribute 'fillColor' in package 'android'
Solution
Vector drawables are available in API level 21, you cant use them in API 19
http://developer.android.com/training/material/drawables.html
Answered By - mihail
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.