在布局文件中写入<Button />出现一下错误提示,该怎么解决?

error: No resource identifier found for attribute 'layout_marginEnd' in package 'android'图片说明

xmlns:android="http://schemas.android.com/apk/res/android"
这个加了么

可以贴下报错的代码么

题主,Start和End是Google从Android4.2开始,为了配合RTL布局给布局添加的新属性。
所以,在4.2以下,Start与End属性是无效的。
你看看是不是你项目定的版本太低,所以导致报错?

线性布局的Button error: No resource identifier found for attribute 'layout_marginStart' in package 'android'怎么解决啊?