RuntimeException:宽度(0)和高度(0)不能< = 0 [英] RuntimeException : Width (0) and height (0) cannot be <= 0

查看:413
本文介绍了RuntimeException:宽度(0)和高度(0)不能< = 0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了此类错误,我该如何解决此问题.

I have got this type of error, How may I resolve this issue.

java.lang.RuntimeException:java.lang.RuntimeException:发生错误 处理D:\ Android 项目\ AttendanceApp \ app \ src \ main \ res \ drawable \ ic_arrow_back.xml: 宽度(0)和高度(0)不能< = 0

java.lang.RuntimeException: java.lang.RuntimeException: Error while processing D:\Android Project\AttendanceApp\app\src\main\res\drawable\ic_arrow_back.xml : Width (0) and height (0) cannot be <= 0

ic_arrow_back.xml

ic_arrow_back.xml

<vector android:height="@dimen/_25sdp" android:tint="#FFFFFF"
    android:viewportHeight="24.0" android:viewportWidth="24.0"
    android:width="@dimen/_25sdp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="#FF000000" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>

推荐答案

您需要在应用的build.gradle上添加某些属性.

You need to add certain attributes on your app's build.gradle.

android {  
   defaultConfig {  
     vectorDrawables.useSupportLibrary = true  
    }  
 } 

这篇关于RuntimeException:宽度(0)和高度(0)不能&lt; = 0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆