无法解析符号 ObservableMap<String,Object>

Can not resolve symbol ObservableMap<String,Object>

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
    <data>
        <import type="android.databinding.ObservableMap"/>
        <variable name="user" type="ObservableMap<String,Object>"/>//there is the problem!!!!!!!!
    </data>

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:text='@{user["lastName"]}'
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <Button
            android:text="button"
            android:id="@+id/buttonPanel"
            android:layout_width="match_parent"
            android:layout_height="44dip" />
    </LinearLayout>
</layout>

Android工作室:2.3.1
buildToolsVersion "25.0.3"
类路径 'com.android.tools.build:gradle:2.3.1'

我正在使用 DataBinding。Android Studio 说 无法解析符号 ObservableMap。如果我使用 ObservableMap,一切都很好而不是 ObservableMap

那么..它有什么问题吗?我使用的 AS 版本有误吗?

试试这个。 IDE 可能会在 xml 文件中为此显示错误,但它应该 运行 没问题。

<data>
    <variable name="user" type="ObservableMap&lt;String,Object&gt;"/>
</data>