android burst of red in MainActivity.java file how to do?

Today to record my second blog, in fact, this problem does not happen to me, that I am a student she encountered, as shown below:

Just open the software will find all the files MainActivity.java explosion of red in the Insert Picture description here
At first I thought it was her gradle file What is the problem, but also let her use a small hammer to hit a hit, multi-sync, on net, over the wall.
Later, I checked the search Baidu is not only to find a dime relationship with gradle file, the following is a problem-solving method steps:

Click Android Studio menu File -> Invalidate Caches / Restart, and then click the dialog box
Invalidate and Restarr, empty the cache, Android Studio automatically restart, you can see normal

Later, I understand a little, in fact, had such a mistake is because every time you open the software in time, adroidstudio will automatically clean up invalid cache, if this wrong description last open software androidstudio not cleaned up invalid cache, then our own hand clean up on the line.

Of course, this is an invalid cache clean-up methods, that there should be other ways, children's shoes if you encountered the same problem with other solutions, and Comments are welcome, we learn from each other ah!

Well, today is the day learning record, hope have a harvest day.

With a poem to sum up today's harvest:
the only school without friends, the Gu Lou and widowed Wen. - "Book of Learning"

Released two original articles · won praise 1 · views 101

Guess you like

Origin blog.csdn.net/weixin_43622246/article/details/104663059