file was loaded in the wrong encoding: 'UTF-8&

2019-05-15 09:01发布

my android studio gone crazy like this please help??

file was loaded in the wrong encoding: 'UTF-8' in android studio

file was loaded in the wrong encoding: 'UTF-8' in android studio

3条回答
兄弟一词,经得起流年.
2楼-- · 2019-05-15 09:17

That's not an encoding issue. That's compiled bytecode, the content of a .class file. You cannot simply rename it into .java and expect it to work.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-05-15 09:22

For people in future:

I had the same problem.

I was able to solve it simply by making a copy of the project and opened the copied project. Copied project worked perfectly fine.

Note: I got this problem because of improper shutdown of my PC.

查看更多
虎瘦雄心在
4楼-- · 2019-05-15 09:26

This is an old issue, but if anyone comes across this, what isn't mentioned above, but happening for me is that the original file on disk is intact java code. Android Studio is reading it like this for some reason.

查看更多
登录 后发表回答