我在ImageView
中使用了android
中的向量绘图。
这是我的代码:
<ImageView
android:layout_width="320dp"
android:layout_height="320dp"
app:srcCompat="@drawable/app_logo"
android:id="@+id/titleImageView"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginTop="12dp" />
在API19
中运行应用程序时,我得到了以下错误。
致命例外: main 过程: com.nuvo.driver,PID: 4303 无法启动活动ComponentInfo{com.nuvo.driver/com.nuvo.driver.SignUp_Activity_}:android.view.InflateException:二进制XML文件行#16:错误充气类ImageButton
提前谢谢你的时间。
发布于 2017-10-25 11:05:20
如果在build.gradle文件中使用此代码:
android.defaultConfig.vectorDrawables.useSupportLibrary = true
我想你是用矢量绘图作为按钮或文本视图或者..。这一行为使你的安卓应用程序的异常低于5。如果我猜是真的,请使用以下结构:Is it possible to use VectorDrawable in Buttons and TextViews using android:DrawableRight?。
发布于 2017-10-25 10:26:53
要解决这个问题,你必须做两个选择:
android.defaultConfig.vectorDrawables.useSupportLibrary = true
文件中更改build.gridlehttps://stackoverflow.com/questions/46929592
复制相似问题