Android工作室给我们以下错误

时间:2014-02-13 07:46:22

标签: android android-studio

Android studio在编译程序时显示错误。我不知道它是Android Studio环境问题还是Windows问题。我现在不知道除了C:\windows之外,为什么Android Studio会在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

1 个答案:

答案 0 :(得分:0)

我诊断出问题并解决了它。这是Windows CMD Sefault Path问题...我在注册表中更改了它,我的问题解决了。 我在default的注册表中删除了值为C:\windows\cmd.exe的密钥HKEY_CURRENT_USER\Software\Microsoft\Command Processor,问题已解决......

This is my CMD image with i opened it using command cmd