矢量图错三

日志

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.self.zsp.mutualhelp/zxing.activity.CaptureActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class TextView

分析

<TextView
    android:id="@+id/scanToolBarBack"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:drawableLeft="@drawable/ic_top_back_white"
    android:drawablePadding="@dimen/d12"
    android:gravity="center_vertical"
    android:paddingLeft="@dimen/d12"
    android:text="@string/qrCode"
    android:textColor="@color/background"
    android:textSize="@dimen/s16"
    tools:ignore="RtlSymmetry" />

Android4.4及以下版TextView不可用矢量图,android:drawableLeft="@drawable/ic_top_back_white"致错。

解决

矢量图改位图

猜你喜欢

转载自blog.csdn.net/zsp_android_com/article/details/80691279
今日推荐