拖动布局在Android Studio中不起作用

时间:2018-11-20 10:01:41

标签: android android-studio

我有一个空的xml文件,我想在“设计”选项卡中拖动一个ConstraintLayout,但是它不起作用:

enter image description here

1 个答案:

答案 0 :(得分:1)

我认为您在文本窗格中的layout.xml为空。您只需在

标签下面放置一个linearlayout或任何适合您的布局即可
xmlns:android="http://schemas.android.com/apk/res/android" 

然后您就可以将小部件拖到设计窗格中