2

I get this error when trying to compile a project

Execution failed for task ':ToDo:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: E:\Android Studio\sdk\build-tools\19.0.1\dx.bat --dex --output C:\AndroidStudioProjects\ToDo\ToDo\build\dex\debug C:\AndroidStudioProjects\ToDo\ToDo\build\classes\debug C:\AndroidStudioProjects\ToDo\ToDo\build\dependency-cache\debug Error Code: 1 Output: Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Tried restarting but it will not compile. Any help?

appukrb
  • 1,507
  • 4
  • 24
  • 53
TheDareDevil
  • 129
  • 9

1 Answers1

0

I worked on a project that compiled/run fine with Android Stuido 0.8.2. After openening an second project, I got the error on both project without changing the first one. So the issue must be inside the android-studio configuration, not the project ones. In my case this workaround helped me:

Install the android-studio a second time into an other directory (I used Android-Studio 0.8.0). Open your project with this studio and run it. Ater this successful execution, close the android-studio and delete its directory (Android-Studio 0.8.0). Now the normal android-studio is 'cured' (0.8.2).

Hope it will help you too.

Christian Schulzendorff
  • 1,431
  • 1
  • 18
  • 15