浮动操作按钮不显示图像

floating action button not showing image

我添加了 xml 代码以在我的屏幕上有一个浮动操作按钮(现在没有功能但会)但是当我进入 xml 的设计视图时,而不是显示电子邮件图标图像,它只显示文本 'floating action button': '

谁能解释一下我做错了什么?

the code I use:

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@android:drawable/ic_dialog_email"
        android:layout_gravity="bottom|end"
        app:elevation="6dp"
        app:pressedTranslationZ="12dp"/>

说明没有添加正确的库。尝试添加设计库

implementation 'com.android.support:design:27.1.1'