1

Android studio showing error while compiling program. I have no Idea that is it a Android Studio Environment Issue or Windows Issue. I don't now why is Android Studio finding cmd in C:\windows except of C:\windows\system32.

Execution failed for task

':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.

here is my eacho %PATH% output

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
Umar Abbas
  • 4,399
  • 1
  • 18
  • 23

1 Answers1

0

I diagnosed Issue and solved it. This was Windows CMD Sefault Path Issue... i changed it in registry and my problem solved. I removed key default with value C:\windows\cmd.exe in registry at HKEY_CURRENT_USER\Software\Microsoft\Command Processor and Problem Resolved...

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

Umar Abbas
  • 4,399
  • 1
  • 18
  • 23