0

All my android studio file is not showing original code. All java and XML file affected. When I open a file it shows "File was loaded in the wrong encoding:'UTF-8'. I tried to reload in another coding but problem not resolved. I can see code in Notepad but not in android studio.

CustomApplication.java Original Code showing in Notepad

package satlaa.desijewellery.utils;
import android.app.Application;
import android.content.Context;
import android.content.res.Configuration;

public class CustomApplication extends Application {

@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(LocaleHelper.onAttach(base, "hi"));
}
}

In Android Studio

AAPT               ,  �       
&layout/abc_alert_dialog_title_material 
"�C:\Users\Anjaan\.gradle\caches\transforms-1\files-1.1\appcompat-v7- 

27.1.1.aar\11bca4c6723b60847116b8b51872d16b\res\layout\abc_alert_dialog_title_m aterial.xml* id/alertTitle-* id/titleDividerNoCustom8* id/title_template* id/topPanel � 9 android*http

I can even set here as code. enter image description here

mukeshsoni
  • 483
  • 8
  • 29

1 Answers1

1

Go to :

File -> Other Settings -> Default Settings, find File Encodings, change Project Encoding to System-Default and the other settings as follows:

enter image description here

If this didn't help, try reinstalling the Android Studio (or install the latest version if you already don't use it).

Community
  • 1
  • 1
ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
  • Have you tried using other encodings? Use *Reload in another encoding* and choose another one to see if that effects. You can however, reinstall or install the latest version of android studio without using the old config. – ʍѳђઽ૯ท Oct 09 '18 at 08:49