安卓AndroidStdio控制台乱码解决

安卓AndroidStdio控制台乱码解决

情况:

在AndroidStudio中新建了一个Java Module,但是点击 Run 'app'之后,Build Output 控制台输出的中文都是乱码,都是问号一样的字符

第一个解决方案

File Encodings 改为UTF-8?

没用!

第二个解决方案

build.gradle 添加如下代码?

复制代码
 tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

正确解决办法

双击Shift,输入vmoption,,选择Edit Custom CM Options

如果之前没有配置过,会弹出窗口问是否创建配置文件,点击Create

输入

复制代码
-Dfile.encoding=UTF-8

保存,重启就可以了!

相关推荐
2501_9159214317 分钟前
iOS 26 CPU 使用率监控策略 多工具协同构建性能探索体系
android·ios·小程序·https·uni-app·iphone·webview
狂团商城小师妹17 分钟前
JAVA国际版同城打车源码同城服务线下结账系统源码适配PAD支持Android+IOS+H5
android·java·ios·小程序·交友
游戏开发爱好者822 分钟前
iOS 应用逆向对抗手段,多工具组合实战(iOS 逆向防护/IPA 混淆/无源码加固/Ipa Guard CLI 实操)
android·ios·小程序·https·uni-app·iphone·webview
虚伪的空想家41 分钟前
ip网段扫描机器shell脚本
android·linux·网络协议·tcp/ip·shell·脚本·network
generallizhong1 小时前
android TAB切换
android·gitee
00后程序员张1 小时前
iOS 文件管理与导出实战,多工具协同打造高效数据访问与调试体系
android·macos·ios·小程序·uni-app·cocoa·iphone
Boop_wu1 小时前
[MySQL] JDBC
android
qq_717410012 小时前
FAQ09075:6572平台相机拍照,拍下来的照片无法查看,图库查看时提示“无缩略图”
android
Jerry12 小时前
Compose 的阶段
android
Zhangzy@12 小时前
Rust 编译优化选项
android·开发语言·rust