简体   繁体   English

无法在Android Studio中进行任何编辑或拖动小部件

[英]Can't edit anything or drag widgets in Android Studio

I started off with a black activity and whenever I try using Android studio, I get stuck in this screen. 我开始时是黑色活动,每当尝试使用Android Studio时,都会陷入该屏幕。 I cant drag any widgets, enter any text, or make any changes to the user interface. 我无法拖动任何小部件,输入任何文本或对用户界面进行任何更改。 Is there anything I am missing? 我有什么想念的吗? I downloaded all the Android Studio bundle and I have all the required SDK tools. 我下载了所有Android Studio捆绑包,并且拥有所有必需的SDK工具。 I have attached a screenshot of what I am currently stuck with. 我已经附上了我目前坚持使用的屏幕截图。

A screenshot of what I am seeing: 我所看到的屏幕截图:

我所看到的屏幕截图:

Recently I encountered the same problem myself. 最近我自己遇到了同样的问题。 After some research I found that you must now use the "content_activityname.xml" file in order to edit the ui of an activity. 经过研究后,我发现您现在必须使用“ content_activityname.xml”文件来编辑活动的用户界面。

In your case this file is located in the layout folder, right under your activity_main.xml in the picture provided. 对于您而言,此文件位于布局文件夹中,在提供的图片中位于activity_main.xml的正下方。

According to this thread: What is the role of content_main.xml in android studio 1.4? 根据这个线程: android studio 1.4中content_main.xml的作用是什么? the main.xml now contains the global look of the ui, and also contains the content.xml file which again contains the components of the ui. main.xml现在包含ui的全局外观,还包含content.xml文件,该文件再次包含ui的组件。

You should think of uninstall and reinstall Android Studio and after that creating a new Project. 您应该考虑卸载并重新安装Android Studio,然后再创建一个新Project。 You also are able to look at some tutorials created by the creators of AS. 您还可以查看由AS创建者创建的一些教程。 They can be found at Android Developers . 可以在Android Developers中找到它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM