简体   繁体   中英

Black line over the code in Android Studio and IntelliJ IDEA

I first got this problem in IntelliJ IDEA while writing code but now I"m having this in Android Studio also. I get a black line over my code when I place the cursor in between the code. Is there anyone who is having the same problem as me? I'll appreciate your help.

IntelliJ IDEA 和 Android Studio 中代码上的黑线

Go to File -> Settings

Under IDE Settings expand Editor -> Colors & Fonts -> General

In the list shown on right scroll to Line Number , Now change foreground and background colors.

I am experiencing the same problem. If your using Android Studio 3.0.1 update it to the latest version or click insert on the keyboard.

After updating to the latest version of Android Studio. Do not import your settings from your previous version

Or reset Android Studio's settings by deleting the .AndroidStudio3.0 file under C:\Users[username] in Windows

For Mac remove this files ~/Library/Application Support/AndroidStudio3.0 ~/Library/Caches/AndroidStudio3.0 ~/Library/Logs/AndroidStudio3.0 ~/Library/Preferences/AndroidStudio3.0

Had this same problem in Android Studio, it seems to have come down as part of a buggy IDE update. Studio would work fine for about five minutes and then randomly start obscuring the current code line with a black highlight.

Anyway, clearing out all the AndroidStudio folders in C:\Users[Username] seems to have worked for me.

I restarted Android Studio 3.1.3 to solve this issue. File > Invalidates caches and restart.

Press insert key.
if you can not find,insert key near delete key.

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