3

I am using Gradle 2.14.1 and Android-Gradle plugin 2.2.3 on Android Studio 2.2.3. in a multi-module app. Enabling Jack throws the following exception (stacktrace included) :

Executing tasks: [:MyApp:assembleDebug]

Configuration on demand is an incubating feature.       //disabling CoD does not resolve the issue
Incremental java compilation is an incubating feature.  //I am unable to disable incremental compilation
:MyApp:preBuild UP-TO-DATE
:MyApp:preDebugBuild UP-TO-DATE
:MyApp:compileDebugNdk UP-TO-DATE
:MyApp:checkDebugManifest
:MyApp:preInhouseBuild UP-TO-DATE
:MyApp:preReleaseBuild UP-TO-DATE
:libone:preBuild UP-TO-DATE
:libone:preReleaseBuild UP-TO-DATE
:libone:checkReleaseManifest
:libone:prepareReleaseDependencies
:libone:compileReleaseAidl UP-TO-DATE
:libone:compileReleaseNdk UP-TO-DATE
:libone:compileLint UP-TO-DATE
:libone:copyReleaseLint UP-TO-DATE
:libone:mergeReleaseShaders UP-TO-DATE
:libone:compileReleaseShaders UP-TO-DATE
:libone:generateReleaseAssets UP-TO-DATE
:libone:mergeReleaseAssets UP-TO-DATE
:libone:mergeReleaseProguardFiles UP-TO-DATE
:libone:packageReleaseRenderscript UP-TO-DATE
:libone:compileReleaseRenderscript UP-TO-DATE
:libone:generateReleaseResValues UP-TO-DATE
:libone:generateReleaseResources UP-TO-DATE
:libone:packageReleaseResources UP-TO-DATE
:libone:processReleaseManifest UP-TO-DATE
:libone:generateReleaseBuildConfig UP-TO-DATE
:libone:processReleaseResources UP-TO-DATE
:libone:generateReleaseSources UP-TO-DATE
:libone:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:libone:compileReleaseJavaWithJavac UP-TO-DATE
:libone:processReleaseJavaRes UP-TO-DATE
:libone:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:libone:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:libone:mergeReleaseJniLibFolders UP-TO-DATE
:libone:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:libone:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:libone:bundleRelease UP-TO-DATE
:libtwo:preBuild UP-TO-DATE
:libtwo:preReleaseBuild UP-TO-DATE
:libtwo:checkReleaseManifest
:libtwo:preDebugAndroidTestBuild UP-TO-DATE
:libtwo:preDebugBuild UP-TO-DATE
:libtwo:preDebugUnitTestBuild UP-TO-DATE
:libtwo:preReleaseUnitTestBuild UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportCompat2500Library UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportCoreUi2500Library UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportCoreUtils2500Library UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportFragment2500Library UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportMediaCompat2500Library UP-TO-DATE
:libtwo:prepareComAndroidSupportSupportV42500Library UP-TO-DATE
:libtwo:prepareReleaseDependencies
:libtwo:compileReleaseAidl UP-TO-DATE
:libtwo:compileReleaseNdk UP-TO-DATE
:libtwo:compileLint UP-TO-DATE
:libtwo:copyReleaseLint UP-TO-DATE
:libtwo:compileReleaseRenderscript UP-TO-DATE
:libtwo:generateReleaseBuildConfig UP-TO-DATE
:libtwo:generateReleaseResValues UP-TO-DATE
:libtwo:generateReleaseResources UP-TO-DATE
:libtwo:mergeReleaseResources UP-TO-DATE
:libtwo:processReleaseManifest UP-TO-DATE
:libtwo:processReleaseResources UP-TO-DATE
:libtwo:generateReleaseSources UP-TO-DATE
:libtwo:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:libtwo:compileReleaseJavaWithJavac UP-TO-DATE
:libtwo:extractReleaseAnnotations UP-TO-DATE
:libtwo:mergeReleaseShaders UP-TO-DATE
:libtwo:compileReleaseShaders UP-TO-DATE
:libtwo:generateReleaseAssets UP-TO-DATE
:libtwo:mergeReleaseAssets UP-TO-DATE
:libtwo:mergeReleaseProguardFiles UP-TO-DATE
:libtwo:packageReleaseRenderscript UP-TO-DATE
:libtwo:packageReleaseResources UP-TO-DATE
:libtwo:processReleaseJavaRes UP-TO-DATE
:libtwo:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:libtwo:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:libtwo:mergeReleaseJniLibFolders UP-TO-DATE
:libtwo:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:libtwo:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:libtwo:bundleRelease UP-TO-DATE
:MyApp:prepareComAndroidSupportAnimatedVectorDrawable2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportAppcompatV72500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportCardviewV72500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportCustomtabs2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportDesign2500Library UP-TO-DATE
:MyApp:preDebugAndroidTestBuild UP-TO-DATE
:MyApp:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:MyApp:prepareComAndroidSupportPercent2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportRecyclerviewV72500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportCompat2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportCoreUi2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportCoreUtils2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportFragment2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportMediaCompat2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV42500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportVectorDrawable2500Library UP-TO-DATE
:MyApp:prepareComAndroidSupportTransition2500Library UP-TO-DATE
:MyApp:prepareComCommit451PhotoView124Library UP-TO-DATE
:MyApp:prepareComFacebookAndroidFacebookAndroidSdk4180Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesGcm940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesIid940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesLocation940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMaps940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesVision940Library UP-TO-DATE
:MyApp:prepareComUrbanairshipAndroidUrbanairshipSdk801Library UP-TO-DATE
:MyApp:prepareEcomAndroidConsumerappFacebookUnspecifiedLibrary UP-TO-DATE
:MyApp:prepareEcomAndroidConsumerappLibraryUnspecifiedLibrary UP-TO-DATE
:MyApp:prepareNetDanlewAndroidJoda2943Library UP-TO-DATE
:MyApp:prepareSlyce181Library UP-TO-DATE
:MyApp:prepareDebugDependencies
:MyApp:compileDebugAidl UP-TO-DATE
:MyApp:compileDebugRenderscript UP-TO-DATE
:MyApp:generateDebugBuildConfig
:MyApp:generateDebugResValues UP-TO-DATE
:MyApp:generateDebugResources UP-TO-DATE
:MyApp:mergeDebugResources UP-TO-DATE
:MyApp:processDebugManifest UP-TO-DATE
:MyApp:processDebugResources UP-TO-DATE
:MyApp:generateDebugSources
:MyApp:unzipJacocoAgent UP-TO-DATE
:MyApp:transformClassesWithPreJackPackagedLibrariesForDebug UP-TO-DATE
:MyApp:transformClassesWithPreJackRuntimeLibrariesForDebug UP-TO-DATE
:MyApp:processDebugJavaRes UP-TO-DATE
:MyApp:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:MyApp:transformJackWithJackForDebug
Incremental mode is disabled due to multi-dex legacy mode

<BUNCH OF WARNINGS>

com.android.jack.api.v01.CompilationException: Failed to compile
    at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:144)
    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJackApis(AndroidBuilder.java:1852)
    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJack(AndroidBuilder.java:1679)
    at com.android.build.gradle.internal.transforms.JackTransform.runJack(JackTransform.java:221)
    at com.android.build.gradle.internal.transforms.JackTransform.transform(JackTransform.java:195)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:178)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:174)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:173)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
    at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.jack.frontend.FrontendCompilationException: Failed to compile
    at com.android.jack.Jack.buildSession(Jack.java:1053)
    at com.android.jack.Jack.run(Jack.java:540)
    at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:124)
    ... 92 more

:MyApp:transformJackWithJackForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':MyApp:transformJackWithJackForDebug'.
> com.android.build.api.transform.TransformException: com.android.jack.api.v01.CompilationException: Failed to compile
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':MyApp:transformJackWithJackForDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
    at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.jack.api.v01.CompilationException: Failed to compile
    at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:54)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:158)
    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:173)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 70 more
Caused by: com.android.build.api.transform.TransformException: com.android.jack.api.v01.CompilationException: Failed to compile
    at com.android.build.gradle.internal.transforms.JackTransform.transform(JackTransform.java:198)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:178)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:174)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
    ... 78 more
Caused by: com.android.jack.api.v01.CompilationException: Failed to compile
    at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:144)
    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJackApis(AndroidBuilder.java:1816)
    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJack(AndroidBuilder.java:1643)
    at com.android.build.gradle.internal.transforms.JackTransform.runJack(JackTransform.java:221)
    at com.android.build.gradle.internal.transforms.JackTransform.transform(JackTransform.java:195)
    ... 81 more
Caused by: com.android.jack.frontend.FrontendCompilationException: Failed to compile
    at com.android.jack.Jack.buildSession(Jack.java:1053)
    at com.android.jack.Jack.run(Jack.java:540)
    at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:124)
    ... 85 more

I am unable to post build.gradle because of 30K char limit. Can post if requested. compile and build SDK version is 25. multiDexEnabled is true.

3
  • Are you by any chance using butterknife? github.com/JakeWharton/butterknife/issues/673
    – Carmen
    Commented Dec 7, 2016 at 20:42
  • Sorry, I see they seem to have fixed (or worked around) the issue in Butterknife. But in that issue, you see a link to an issue opened for jack: code.google.com/p/android/issues/detail?id=218017 in which the developers say it's working as intended, and it's not supported to use libraries from com.sun.*. Maybe some other library is doing this?
    – Carmen
    Commented Dec 7, 2016 at 20:51
  • @Carmen I don't use butterknife or any other com.sun.* libraries directly. Transitively - maybe yes. But there's no way to determine which library is causing this issue. I have more than 20 libraries in use.
    – Dev
    Commented Dec 8, 2016 at 17:34

2 Answers 2

4

I had a similar problem. I disabled incremental option:

 compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    incremental false
   }

And I Enabled "Dex In Process" for faster app builds. Add this line to gradle.properties:

   org.gradle.jvmargs = -Xmx5120m
1
  • I had the same problem and I solved with the incremental false! Could you please explain me what it does?
    – giograno
    Commented Jul 21, 2017 at 14:48
-2

This issue is a conflict between antivirus and Android Studio. In my case using Avira , Windows Defender Windows 10 and Android Studio 2.2. You can add android studio process in the exception list of either programs.

Reffer

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.