Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an odd problem with Android Studio. Here is how my class file looks like on Android Studio

And here is what it looks like on a text editor.

enter image description here

Any ideas why it is happening? I have tried closing then reimporting the project, invalidate caches and restart, clean project, build project, delete .idea folder and .iml files. All of my files are broken when opening in AS but looks fine on text editors.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

UPDATE: Quicker solution by the user Hong given below:

Delete the caches folder: C:Usersmy_user_name.AndroidStudio3.3systemcaches

=====================

Here's what worked for me.

  1. Close Android Studio
  2. Go to C:Users*your username*
  3. Locate the Android Studio settings directory named .AndroidStudioX.X (X.X being the version)
  4. Rename it to something like old.AndroidStudioX.X
  5. Start Android Studio, and when it asks if you want to import settings, choose the old directory

This should fix the issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...