不能编辑文件中的Andr​​oid工作室 [英] Can't Edit Files in Android Studio

查看:154
本文介绍了不能编辑文件中的Andr​​oid工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一些未知的原因,我不能在Android Studio中编辑文件。这包括Java和XML文件。

For some unknown reason, I can't edit files in Android Studio. This include both java and xml files.

当我推出Android工作室(版本1.2.2),一切都很好。然而,一段时间后,我失去了编辑文件内容的能力。以下是我发现:

When I launch Android Studio (ver 1.2.2) , everything is fine. However, after some time, I lose the ability to edit files content. Here is what I noticed:


  • 当我点击源$ C ​​$ C的线,线被强调,但插入符号指标没有显示。

  • 当我开始打字,一个搜索:箱开始出现在左面板(Project窗口)的顶部,并开始根据过滤项目文件是什么我型!

  • 文件不会被锁定为只读。我检查。

  • 重新启动Android的工作室并没有彻底解决它。一切接缝细了一段时间,那么问题又出现了。

  • 我没有检查我的键盘,看看我有一个stucked按键可能会导致此问题。没有注意到什么。

  • 在项目窗口,我注意到 MainActivity 文件名是灰色的(见下图)。我不知道这是因为我做的事,或者是Android的工作室如何识别项目的主要活动。

  • When I click on any line in the source code, the lines gets highlighted but the caret indicator is not showing.
  • When I start typing, a search for: box starts appearing on the top of the left panel (Project window), and it start filtering the project files according to what I type!
  • Files are not locked as Read-Only. I checked.
  • Restarting Android Studio did not resolve it permanently. Everything seams fine for some time, then the problem appears again.
  • I did check my keyboard to see if I have a stucked keystroke that might cause this problem. Didn't notice anything.
  • In the Project window, I noticed that MainActivity file name is in grey (See the screenshot below). I'm not sure if this is because of something I did, or if it is how Android Studio identifies the main Activity in the project.

项目视图屏幕快照

推荐答案

这似乎是,的code以失去焦点的项目视图即可。这就是为什么我不能编辑code和显示的搜索框:因为专注与项目视图中,永久

This appears to be that the Code view to loses focus to the Project view. That's why I can't edit the code and the search box appears: because The focus is with the Project view, permanently.

我无法找到一个永久的解决办法。然而,意外,我发现了一个解决办法是比重新启动Android Studio中那么讨厌:

I couldn't find a permanent solution. However, by accident, I found a workaround that is less annoying than restarting Android Studio:

当你失去重点项目视图中,点击最右侧的code查看,这里的滚动条存在。

When you lose focus to the Project view, click on the far right of the Code View, where the scrollbar exist.

我试图找出是什么原因导致项目视图永久偷焦点,但我不能。直到有人做,这将是公认的答案。

I tried to figure out what causes the Project View to steal the focus permanently but I couldn't. Until someone do, this will be the accepted answer.

这篇关于不能编辑文件中的Andr​​oid工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆