Android Studio - “Unmappable character for encoding UTF-8”

后端 未结 3 1507
野趣味
野趣味 2021-02-05 11:15

All was working fine and dandy with Eclipse in Windows until I switched to Mac OS X Yosemite, using Android Studio V1.0. I imported the project as a Non-Android Studio project s

3条回答
  •  滥情空心
    2021-02-05 11:42

    I have encountered this problem, too. The reason for my problem is that I copy a file which is not encoded UTF-8 from Eclipse to Android Studio. A solution to this problem is that:

    1. Make sure the default file encoding of your Android Studio is UTF-8: Settings --> File Encodings, set IDE Encoding, Project Encoding and Default encoding for properties files to UTF-8.
    2. Copy your error file to a txt file and delete the error file.
    3. Create a new file, its name is as the same as the deleted file.
    4. Copy the content from the txt file to the new file.

提交回复
热议问题