简体   繁体   中英

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

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.

From your screenshot I think you are in an Insert mode

click on INS button top of arrow keys

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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