0

I am getting following build error

Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

build --debug

build --stacktrace

build --info

Kuldeep
  • 191
  • 1
  • 6
  • 17

3 Answers3

2

Look at the --debug log. There is a very verbose error description starting with the text:

trouble processing "javax/transaction/HeuristicCommitException.class":

Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library.

This is often due to inadvertently including a core library file in your application's project, when using an IDE (such as Eclipse). If you are sure you're not intentionally defining a core class, then this is the most likely explanation of what's going on.

I think the bottom line is that you shouldn't be including libraries that contain classes defined in java.* or javax.*. You'll have to trim down your dependencies. Android development can not normally handle J2EE type code.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
0
  1. Try cleaning your project.

  2. If that doesn't works then: Try adding multiDexEnabled true to your app build.gradle file

djinc
  • 171
  • 3
  • 14
  • @Kuldeep See this link - "http://stackoverflow.com/questions/28917696/errorexecution-failed-for-task-appdexdebug-com-android-ide-common-process" and see if any of the solution helps you. – djinc Feb 09 '16 at 03:06
  • @samjhol I think I have some different problem – Kuldeep Feb 10 '16 at 00:46
-1

Add

dexOptions {
            preDexLibraries = false
            additionalParameters=['--core-library']
}

In you app level gradel inside android..It will work 100%

Jeethendra
  • 29
  • 1
  • 6