我如何在Android布局中使用视图?

时间:2016-11-18 06:23:46

标签: android-layout android-studio

<view
    android:layout_marginTop="530dp"
    android:layout_width="match_parent"
    android:layout_height="2dp"/>

如果我在android studio中使用此代码。我有渲染问题 错误: 无法使用类属性

来扩展视图标记

2 个答案:

答案 0 :(得分:0)

我认为您已经提供了“查看”而不是“查看”

答案 1 :(得分:0)

请使用此

<View
 android:layout_marginTop="530dp"
 android:layout_width="match_parent"
 android:layout_height="2dp"/>

希望这会对你有所帮助