Home > Software design >  why I am not able to code and edit code in android studio in activity_main xml file?
why I am not able to code and edit code in android studio in activity_main xml file?

Time:03-21

In Android Studio

when I click on any line in the source code, the lines get highlighted but the caret indicator is not showing and the code is not editable

[As you can see in text View the "id" is highlighted but the code is not editable][1] [1]: https://i.stack.imgur.com/gmi5Z.png

Would someone tell me how can I make it right?

Solutions:

first of all, thanks everyone for trying helping me with this problem

So after wasting almost 5 hours here are some methods I used and solved my problem

1: File > Invalidate Caches > Invalidate and restart 2: Delete the android studio project folder in user folder in C drive 3: Click on the right side of android studio and then try to code 4: Click on the " green V " and disable "Idea Vim" 5: Delete unwanted plugins 6: Reinstall Android studio

For me, method 4 worked but here I mentioned all of them, just in case; It might not work for others.

CodePudding user response:

From your screenshot I think you are in an Insert mode

click on INS button top of arrow keys

CodePudding user response:

Try these methods to solve this problem

1: File > Invalidate Caches > Invalidate and restart. 2: Delete the android studio project folder in user folder in C drive. 3: Click on the right side of android studio and then try to code. 4: Click on the " green V " bottom right corner and disable "Idea Vim." 5: Delete unwanted plugins. 6: Reinstall Android studio.

For me, method 4 worked but here I mentioned all of them, just in case; It might not work for others.

  • Related