Android Java source java files opens as png files something

后端 未结 3 1858
花落未央
花落未央 2021-01-23 01:10

Today Android Studio started to behave strange. Source java files opens as png files something. I can build and run the app and if I look in the file system the java files looks

相关标签:
3条回答
  • 2021-01-23 01:35

    Another way to solve this:

    Close Android Studio and delete the caches folder:

    C:\Users\user_name\.AndroidStudio4.0\system\caches

    0 讨论(0)
  • 2021-01-23 01:47

    I found a solution that worked for me. I hade to open every java source file and all xml files into a text editor(Notepad++) and change something then save the file back to origin.

    Now Android Studio detect all files as normal

    0 讨论(0)
  • 2021-01-23 01:48

    When you save a file at notepad and open it in Android Studio, it will happen because notepad use a different encoding (ANSI).

    You can set your project file encodings at Settings->Editor->File Encodings

    You can also edit a unique file encoding at File->File Encoding

    Make sure your project file encoding is UTF-8 (default)

    Another important setting is File Types that you can take a look too. Here is mine .java file setting to you as example.

    0 讨论(0)
提交回复
热议问题