-1

I am getting this error when I am using rebuild the app it finished successfully but when i am using the run app it shows this error. I am not getting any relevant answer. Please help me for

Error:Execution failed for task ':app:createDebugMainDexClassList'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 1

Codelover
  • 265
  • 2
  • 14
  • 1
    post your app level build.gradle – Onkar Nene Jul 01 '16 at 06:28
  • Possible duplicate of [Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException](http://stackoverflow.com/questions/28917696/errorexecution-failed-for-task-appdexdebug-com-android-ide-common-process) – Onkar Nene Jul 01 '16 at 06:30

4 Answers4

0

At first you go to

Build -> Clean Project 

and then go to

Build -> Rebuild Project

if its not work then check this

defaultConfig {        
// Enabling multidex support.
multiDexEnabled true
}
Janki Gadhiya
  • 4,492
  • 2
  • 29
  • 59
Mohit Madaan
  • 469
  • 2
  • 11
0

Update Your JDK from 1.7 to 1.8, JDK 1.8 is recommended for Android Studio and also it improves functionality.

Check this link for Execution Fail - Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException

Hope it will help!

Community
  • 1
  • 1
Onkar Nene
  • 1,359
  • 1
  • 17
  • 23
0

Try this.It worked for me.

First enable

defaultConfig {
 multiDexEnabled true
 }

Include in your app level build.gradle dependencies this:

compile 'com.android.support:multidex:1.0.0'

then in your Manifest add name of the application as below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="----<your package>-----">
<application
    android:name="android.support.multidex.MultiDexApplication">
    ...
</application>
</manifest>
TheHound.developer
  • 396
  • 1
  • 3
  • 16
-1

Change android buildToolsVersion according to android compileSdkVersion if yourcompileSdkVersion is 23 then set buildToolsVersion to 23.0.1 or 23.0.2 try this hope this solve your problem.

Pritam Banerjee
  • 17,953
  • 10
  • 93
  • 108
Centreonyx
  • 34
  • 3