This behavior is a problem related to an incompatibility between IntelliJ (and then Android Studio) and the new windows 10 console (https://youtrack.jetbrains.com/issue/PY-14354).
It is possible to bypass the problem enabling the legacy mode in the terminal options.
- Launch a command prompt from windows (win+r and then type cmd)
- Right click on the title
- properties
- options
- check Use legacy console, then click OK
- Close the terminal and open another one (or just restart Android Studio, it works both ways)