【发布时间】:2014-02-13 07:46:22
【问题描述】:
Android Studio 在编译程序时显示错误。我不知道这是 Android Studio 环境问题还是 Windows 问题。我现在不明白为什么 Android Studio 会在 C:\windows 除了 C:\windows\system32 之外找到 cmd。
任务执行失败
':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Program Files (x86)\Android\android-studio\sdk\build-tools\19.0.1\dx.bat --dex --output
C:\Users\Umar\AndroidStudioProjects\EchoDaily\app\build\dex\debug
C:\Users\Umar\AndroidStudioProjects\EchoDaily\app\build\classes\debug
C:\Users\Umar\AndroidStudioProjects\EchoDaily\app\build\dependency-cache\debug
C:\Users\Umar\AndroidStudioProjects\EchoDaily\app\build\pre-dexed\debug\classes-56833bce4b6617d8545062aa1572a07084939734.jar
C:\Users\Umar\AndroidStudioProjects\EchoDaily\app\build\pre-dexed\debug\support-v4-19.0.1-04dde37e48405b4442ed2e114457f34f6f27cab4.jar
Error Code:
1
Output:
'C:\windows\cmd.exe' is not recognized as an internal or external command,
operable program or batch file.
'C:\windows\cmd.exe' is not recognized as an internal or external command,
operable program or batch file.
'C:\windows\cmd.exe' is not recognized as an internal or external command,
operable program or batch file.
这是我的eacho %PATH% 输出
C:\Program Files (x86)\PC Connectivity Solution\;
C:\Program Files\Dell\DW WLAN Card;;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;
C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;
C:\Program Files (x86)\Common Files\UleadSystems\MPEG;
C:\Program Files\Microsoft\Web Platform Installer\;
C:\Program Files (x86)\HMA! Pro VPN\bin
【问题讨论】:
-
在您的 cmd 中运行此命令并将输出包含在问题中。
echo %PATH%. -
@pyus13 我添加了我的
echo %PATH%输出 -
我在办公室,无法编辑我的环境变量来复制错误,但您能否尝试在更改后
DW LAN Card重新启动 AS 后删除路径变量中的多余分号。 -
@pyus13 我的输出格式正确。
-
下载新版 AS 后仍然面临该问题