AndroidStudio run Build Output garbled problem solving

AndroidStudio run Build Output garbled problem solving

The problem is as follows:

Solution steps:

1. Open the file (the operation path is shown in the figure below): studio64.exe.vmoptions (studio32.exe.vmoption for 32-bit systems), if there is no such file, you will be prompted to create the file. After the creation is complete, enter the following in the file :

-Dfile.encoding=UTF-8

The specific operation is shown in the figure:

2. Connect the mobile phone to compile and run the project (must compile and run) as shown in the figure:

3. After compiling and running, the garbled code is no longer displayed, but there is still an error report similar to the following figure. At this time, close AndroidStudio.

4. After closing AndroidStudio

4.1. Go to C:\Users\your own account name\.android folder and delete the build-cache folder. As shown:

4.2. Enter C:\Users\your account name\.AndroidStudio3.2\system folder (AndroidStudio3.2 is the version folder you installed yourself), delete the following files (if there is no corresponding file, skip ), after the deletion is complete, reopen AndroidStudio and open the project.

  • caches
  • compiler
  • compile-server
  • conversion
  • external_build_system
  • frameworks
  • gradle
  • resource_folder_cache

 

Guess you like

Origin blog.csdn.net/nsacer/article/details/108880498