Tag Archives: androidstudy

Android studio introduces code error, but it can run normally

I just encountered this problem because the computer monitor was black, so I directly shut down and restarted the project. After booting up, the AndroidStudio project could run normally, but many clearly existing classes were reported to introduce errors, causing various methods and classes to draw red lines, although they could run normally, but this has affected the normal development.
After searching on the Internet, I found several solutions and tried to find the most effective one:
1. Close AndroidStudio
2.
: : Users\WIN10\.AndroidStudio3.4

Android studio auto import auto import

Since as does not automatically guide packages by default, it needs to be set.

File–> Settings–> Editor–> General–> Auto Import

Automatic import is to put
1. Insert Imports on Paste option changes to All.
2. Check immediately for Optimize imports on the fly
Neil: You’ll Add umambiguous imports on the fly

The following figure

Reference: http://blog.csdn.net/buaaroid/article/details/44979629