Android Studio garbled characters

Preface
If Android Studio is not configured, the problem of Chinese garbled characters in the console will be very serious when running the program, and even affect our information acquisition and program tracking.

Through the development experience over the years, in this article, I have summarized four methods to solve the problem of Chinese garbled characters in the console, hoping to help everyone.img

Note: The following is a summary based on my daily work experience. The order of sorting is the order of modification that we need to pay attention to. Be sure to restart Android Studio after each modification to make the configuration take effect.

Solution:
1. Find Edit Custom VM Options... in help and open the file, add -Dfile.encoding=UTF-8 in the file, as shown below:img

img

2. Find File Encoding in the settings, and set UTF-8 in it, as shown belowimg

3. Open the settings, search for font, and modify the set font (some fonts do not support Chinese, choose according to your needs)img

The problem of garbled characters has been successfully modified
The above four methods can completely modify the problem of Chinese garbled characters in the console we encountered in Android Studio. I hope that after reading this post, please leave a message in this post which method you used to modify successfully. Below, help more people.img

Summary
In this article, I have summarized four methods to perfectly solve the problem of Chinese garbled characters in the Android Studio console. Here I emphasize again: after each modification, Android Studio must be restarted to make the configuration take effect.

In addition, you can tell which method is useful to you in the comment area, that is to say which garbled problem is the most common. I will update more frequently about blogs about IDEA's questions and some tips! Great tool to use!

Guess you like

Origin blog.csdn.net/s178435865/article/details/130546192