不支持PorterDuff颜色过滤器

时间:2015-12-23 11:31:20

标签: android xml android-studio

我刚刚切换到Android Studio。创建空白活动后,我面临渲染问题。当我转到xml并选择API 19或更低版本进行预览时,我看到了这个错误:

The graphics preview in the layout editor may not be accurate  : 
      - PorterDuff Color Filters are not supported.

这是xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="ir.iseemedia.trubleshooter.MainActivity"
    tools:showIn="@layout/activity_main">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Title :"
        android:id="@+id/ConnectionSpeedTitle" />

</RelativeLayout>

Rendering problem

有人可以解释一下问题是什么?如何解决?

1 个答案:

答案 0 :(得分:0)

显然将Rendering API更改为Upper API级别会使此错误消失。但我仍然不知道这个问题的原因。

enter image description here