解决android studio build Output中文乱码

1.效果如下所示:

代码运行报错的时候,Build Output报的错误日志中中文部分出现乱码,导致看不到到底报的什么错。

2.解决办法如下:

点击Android studio开发工具栏的Help-Edit Custom VM Options....,Android studio会打开studio64.exe.vmoptions文件,在文件中添加**-Dfile.encoding=UTF-8**,然后点击File- Invalidate Caches / Restart.... 关闭并重启Android studio。

3.最终结果:

运行项目,乱码没有了,可以正常查看错误信息了

相关推荐
Ya-Jun3 小时前
常用第三方库:flutter_boost混合开发
android·flutter·ios
_一条咸鱼_4 小时前
深度剖析:Android NestedScrollView 惯性滑动原理大揭秘
android·面试·android jetpack
_一条咸鱼_4 小时前
深度揭秘!Android NestedScrollView 绘制原理全解析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android CoordinatorLayout:从源码深度解析其协同工作原理
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android View 的 TranslationY 位移原理:源码深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android NestedScrollView 滑动原理:源码深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
深度揭秘:Android NestedScrollView 拖动原理全解析
android·面试·android jetpack
_小马快跑_4 小时前
重温基础:LayoutInflater.inflate(resource, root, attachToRoot)参数解析
android
_一条咸鱼_4 小时前
揭秘!Android RecyclerView 预取(Prefetch)原理深度剖析
android·面试·android jetpack
_一条咸鱼_4 小时前
揭秘 Android ImageView:从源码深度剖析使用原理
android·面试·android jetpack