Android Studio构建输出中文乱码解决方案
问题描述:
在使用Android Studio构建项目时,构建输出中的中文出现乱码。
解决方法:
- 修改Gradle配置文件
在项目根目录下找到'gradle.properties'文件,添加以下配置:
org.gradle.jvmargs=-Dfile.encoding=UTF-8
- 修改IDEA配置文件
在Android Studio安装目录下的'bin'文件夹中找到'idea.properties'文件,添加以下配置:
-Dfile.encoding=UTF-8
- 修改控制台配置
在Android Studio中的File -> Settings -> Editor -> General -> Console中,将Console encoding设置为UTF-8。
- 重启Android Studio
重启Android Studio后,重新构建项目,中文应该就能正常显示了。
原文地址: https://www.cveoy.top/t/topic/oYrg 著作权归作者所有。请勿转载和采集!