修改为 xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:materialdesign="http://schemas.android.com/apk/res-auto" 这是自定义属性引入有问题造成的。
1、 xmlns:materialdesign="http://schemas.android.com/tools" tools命名空间可以用来预览一些布局属性的添加和删除后的效果,但是程序运行并不起作用。 http://blog.csdn.net/zhengdan66/article/details/46960985
2、 xmlns:materialdesign="http://schemas.android.com/apk/res-auto" 是自定义属性 https://zhidao.baidu.com/question/394670552939034365.html
此外关于两个声明的不同的命名空间,android的是系统的,app是自定义的。