8

I suppose this a really dumb question, and I can't find any others like it so I suppose it is REALLY dumb, but it is still driving me nuts and I can't figure this out.

So every time I open a file in Android Studio it won't let me edit it, like it is in some kind of read-only or selection mode or something. It'll still let me select and drag text and paste text... just not type. Well, usually. I don't know why but after fiddling around a bunch sometimes it will sometimes let me edit and I can't tell what I'm doing to get that to change.

Any help would be appreciated, I'm sure this is a quick fix...

sjschmidt93
  • 81
  • 1
  • 1
  • 2

5 Answers5

4

I think, the file is locked as READ-ONLY. enter image description here

You can click on the lock icon to toggle the READ-ONLY Option.The option can be found at the BOTTOM-RIGHT Corner of the Android Studio.

theapache64
  • 10,926
  • 9
  • 65
  • 108
3

I also faced same problem.The solution that helped me is to Invalidating Caches / restarting android studio.

Go to Files -> Invalidate Caches / Restart and wait for Rebuilding the project.

flashberry
  • 153
  • 11
  • This works in my case as I was facing the same issue i.e unable to edit one Kotlin file was in either way and the rest all files are working perfect fine in Android studio on Mac book. – asadullah Sep 10 '21 at 17:54
1

Try this solution :

Go to Files > Made File Writable

Here you go , you can now edit your files .

Hanisha
  • 849
  • 10
  • 8
1

locate ideaVim and disenable it you can find it at the bottom right of your android studio

0

Disable ideavim, disable make file read-only with lock icon on your right bottom corner