Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 941
Waqar Vicky Avatar asked Oct 08 '16 12:10

Waqar Vicky


People also ask

How to fix file was loaded in the wrong encoding UTF-8 in Android Studio?

An encoding issue can be solved by deleting all files contained in the Android Studio "caches" folder, which can be found in "C:\Users<username>. AndroidStudioX. Y\system\caches". Make sure that to close Android Studio before deleting.

What is UTF-8 encoding in Android?

UTF-8, UTF-16, ISO 2022, and EUC are examples of character-encoding schemes. Encoding schemes are often associated with a particular coded character set; UTF-8, for example, is used only to encode Unicode.

Does Android use UTF-8?

The default character encoding for Android is UTF-8, as specified by the JavaDoc of the Charset.

What is file encoding in Android Studio?

The "encoding" of a given source file tells the compiler and the IDE how to interpret the bytes in the file as characters. The encoding used to compile your project is specified in the build. gradle files. The default, which is used when no specific encoding is specified, is UTF-8.


2 Answers

An encoding issue can be solved by deleting all files contained in the Android Studio "caches" folder, which can be found in "C:\Users<username>.AndroidStudioX.Y\system\caches".

Make sure that to close Android Studio before deleting.

like image 105
Akshay Chouhan Avatar answered Sep 17 '22 05:09

Akshay Chouhan


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.

like image 45
M Shaban Ali Avatar answered Sep 17 '22 05:09

M Shaban Ali