Build Failed with Exception

not-a-bug

(Mohammed Harris Rahman) #1

Days left I have no clue to sort this issue out, can anyone please find me a solution to this issue:

Executing tasks: [:app:assembleDebug, :appGradeLib:assembleDebug, :googleplayserviceslib:assembleDebug]

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:appGradeLib:preBuild UP-TO-DATE
:appGradeLib:preReleaseBuild UP-TO-DATE
:appGradeLib:compileReleaseNdk UP-TO-DATE
:appGradeLib:compileLint
:appGradeLib:copyReleaseLint UP-TO-DATE
:appGradeLib:mergeReleaseProguardFiles UP-TO-DATE
:appGradeLib:packageReleaseRenderscript UP-TO-DATE
:appGradeLib:checkReleaseManifest
:appGradeLib:prepareReleaseDependencies
:appGradeLib:compileReleaseRenderscript UP-TO-DATE
:appGradeLib:generateReleaseResValues UP-TO-DATE
:appGradeLib:generateReleaseResources UP-TO-DATE
:appGradeLib:packageReleaseResources UP-TO-DATE
:appGradeLib:compileReleaseAidl UP-TO-DATE
:appGradeLib:generateReleaseBuildConfig UP-TO-DATE
:appGradeLib:mergeReleaseShaders UP-TO-DATE
:appGradeLib:compileReleaseShaders UP-TO-DATE
:appGradeLib:generateReleaseAssets UP-TO-DATE
:appGradeLib:mergeReleaseAssets UP-TO-DATE
:appGradeLib:processReleaseManifest UP-TO-DATE
:appGradeLib:processReleaseResources UP-TO-DATE
:appGradeLib:generateReleaseSources UP-TO-DATE
:appGradeLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:appGradeLib:compileReleaseJavaWithJavac UP-TO-DATE
:appGradeLib:processReleaseJavaRes UP-TO-DATE
:appGradeLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:appGradeLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:appGradeLib:mergeReleaseJniLibFolders UP-TO-DATE
:appGradeLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:appGradeLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:appGradeLib:bundleRelease UP-TO-DATE
:googleplayserviceslib:preBuild UP-TO-DATE
:googleplayserviceslib:preReleaseBuild UP-TO-DATE
:googleplayserviceslib:compileReleaseNdk UP-TO-DATE
:googleplayserviceslib:compileLint
:googleplayserviceslib:copyReleaseLint UP-TO-DATE
:googleplayserviceslib:checkReleaseManifest
:googleplayserviceslib:preDebugAndroidTestBuild UP-TO-DATE
:googleplayserviceslib:preDebugBuild UP-TO-DATE
:googleplayserviceslib:preDebugUnitTestBuild UP-TO-DATE
:googleplayserviceslib:preReleaseUnitTestBuild UP-TO-DATE
:googleplayserviceslib:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:googleplayserviceslib:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:googleplayserviceslib:prepareReleaseDependencies
:googleplayserviceslib:compileReleaseAidl UP-TO-DATE
:googleplayserviceslib:compileReleaseRenderscript UP-TO-DATE
:googleplayserviceslib:generateReleaseBuildConfig UP-TO-DATE
:googleplayserviceslib:mergeReleaseShaders UP-TO-DATE
:googleplayserviceslib:compileReleaseShaders UP-TO-DATE
:googleplayserviceslib:generateReleaseAssets UP-TO-DATE
:googleplayserviceslib:mergeReleaseAssets UP-TO-DATE
:googleplayserviceslib:generateReleaseResValues UP-TO-DATE
:googleplayserviceslib:generateReleaseResources UP-TO-DATE
:googleplayserviceslib:mergeReleaseResources
D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
:googleplayserviceslib:mergeReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:googleplayserviceslib:mergeReleaseResources’.

D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:googleplayserviceslib:mergeReleaseResources’.
    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: com.android.build.gradle.tasks.ResourceException: D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
    at com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:185)
    at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:88)
    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: D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
    at com.android.ide.common.res2.MergeWriter.end(MergeWriter.java:54)
    at com.android.ide.common.res2.MergedResourceWriter.end(MergedResourceWriter.java:129)
    at com.android.ide.common.res2.DataMerger.mergeData(DataMerger.java:295)
    at com.android.ide.common.res2.ResourceMerger.mergeData(ResourceMerger.java:405)
    at com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:178)
    … 78 more
    Caused by: java.lang.RuntimeException: D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
    at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:119)
    at com.android.ide.common.res2.MergeWriter.end(MergeWriter.java:50)
    … 82 more
    Caused by: D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
    at com.android.ide.common.res2.MergingException$Builder.build(MergingException.java:129)
    at com.android.ide.common.res2.MergedResourceWriter$1.call(MergedResourceWriter.java:218)
    at com.android.ide.common.res2.MergedResourceWriter$1.call(MergedResourceWriter.java:171)
    Caused by: com.android.ide.common.internal.PngException: File path too long on Windows, keep below 240 characters : D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png
    at com.android.builder.png.QueuedCruncher.crunchPng(QueuedCruncher.java:179)
    at com.android.ide.common.res2.MergedResourceWriter$1.call(MergedResourceWriter.java:201)
    … 1 more

BUILD FAILED

Total time: 3.594 secs


(Stefan Wolf) #2

Hi Mohammed,

thank you for reporting. The stacktrace says:

Caused by: D:\Mysites\Android Apps\x\f\googleplayserviceslib\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\res\drawable-xxhdpi\abc_textfield_search_activated_mtrl_alpha.9.png: Error: File path too long on Windows, keep below 240 characters

This is a Windows limitation. Could you try moving your project directory closer to the root of your Windows drive and see if the build works from there?

Regards,
Stefan


(Chris Doré) #3

Could probably be quickly tested without moving any files by using subst. For example, if the project root is D:\Mysites\Android Apps\x\f\googleplayservices,

subst z: "D:\Mysites\Android Apps\x\f\googleplayservices"

Then z:\ would contain your project and the paths would be shorter.