尝试打开 Android Studio 终端时出现以下错误。
Cannot open Local Terminal
Failed to start [cmd.exe] in D:/NirapodBima
See your idea.log (Help | Show Log in Explorer) for the details.
根据错误日志指令进入idea.log文件并发现以下错误。错误日志显示 winpty 可执行文件丢失,但我不知道如何解决此错误。也尝试将 Android Studio 作为管理模式,但没有运气。
2020-06-15 07:48:44,841 [2404236] INFO - m.pty4j.windows.WindowsVersion - Windows version: 6.3.9600
2020-06-15 07:48:44,845 [2404240] INFO - erminal.AbstractTerminalRunner - Cannot open Local Terminal
java.util.concurrent.ExecutionException: Failed to start [cmd.exe] in D:/NirapodBima
at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:225)
at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:48)
at org.jetbrains.plugins.terminal.AbstractTerminalRunner.lambda$openSessionInDirectory$4(AbstractTerminalRunner.java:208)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Couldn't create PTY
at com.pty4j.windows.WinPtyProcess.<init>(WinPtyProcess.java:75)
at com.pty4j.windows.WinPtyProcess.<init>(WinPtyProcess.java:50)
at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:109)
at com.pty4j.PtyProcess.exec(PtyProcess.java:78)
at com.pty4j.PtyProcess.exec(PtyProcess.java:49)
at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:217)
... 8 more
Caused by: com.pty4j.PtyException: Error starting winpty: agent executable does not exist: 'F:\D-drive\1\lib\pty4j-native\win\x86_64\winpty-agent.exe'
at com.pty4j.windows.WinPty.<init>(WinPty.java:93)
at com.pty4j.windows.WinPtyProcess.<init>(WinPtyProcess.java:72)
... 13 more