所有android项目文件编码错误 [英] All android project file encoded wrongly
问题描述
我所有的 android studio 文件都没有显示原始代码.所有 java 和 XML 文件都受到影响.当我打开一个文件时,它显示文件以错误的编码加载:'UTF-8'.我尝试重新加载另一个编码,但问题没有解决.我可以在记事本中看到代码,但在 android studio 中看不到.
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 原始代码显示在记事本中
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"));
}
}
在 Android Studio 中
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材料.xml*id/alertTitle-*id/titleDividerNoCustom8*id/title_template*id/topPanel9安卓*http
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.
推荐答案
转到:
文件 ->其他设置 ->Default Settings
,找到File Encodings
,将Project Encoding改为System-Default
,其他设置如下:
File -> Other Settings -> Default Settings
, find File Encodings
, change Project Encoding to System-Default
and the other settings as follows:
如果这没有帮助,请尝试重新安装 Android Studio(如果您已经不使用它,请安装最新版本).
If this didn't help, try reinstalling the Android Studio (or install the latest version if you already don't use it).
这篇关于所有android项目文件编码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!