I have a simple test android project that I can test fine using ".\gradlew calabashDebug" in a DOS shell logged in as myself. However, when I run the project under Jenkins on a Continuous Integration server it fails with a "No keystores found." error
(see stack trace below).
07:54:04.462 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
07:54:04.464 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command 'cmd'.
07:54:04.507 [INFO] [org.gradle.process.internal.ProcessParentingInitializer] An attempt to initialize for well behaving parent process finished.
07:54:04.513 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
07:54:04.513 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
07:54:04.514 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'cmd''
07:54:05.111 [QUIET] [system.out] No test server found for this combination of app and calabash version. Recreating test server.
07:54:05.111 [QUIET] [system.out] No keystores found.
07:54:05.112 [QUIET] [system.out] Please create one or run calabash-android setup to configure calabash-android to use an existing keystore.
07:54:05.117 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
07:54:05.118 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'cmd'' finished with exit value 1 (state: FAILED)
07:54:05.119 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':calabashDebug'
07:54:05.119 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :calabashDebug FAILED
07:54:05.120 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :calabashDebug (Thread[main,5,main]) completed. Took 0.666 secs.
07:54:05.120 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 1.014 secs, idle: 0.016 secs
07:54:05.125 [ERROR] [org.gradle.BuildExceptionReporter]
07:54:05.127 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
07:54:05.127 [ERROR] [org.gradle.BuildExceptionReporter]
07:54:05.127 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
07:54:05.129 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':calabashDebug'.
07:54:05.129 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'cmd'' finished with non-zero exit value 1
07:54:05.130 [ERROR] [org.gradle.BuildExceptionReporter]
07:54:05.131 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
07:54:05.132 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':calabashDebug'.
07:54:05.132 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
07:54:05.132 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
07:54:05.133 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
07:54:05.133 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
07:54:05.133 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
07:54:05.134 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
07:54:05.134 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
07:54:05.134 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
07:54:05.134 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
07:54:05.135 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
07:54:05.135 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
07:54:05.135 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
07:54:05.136 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
07:54:05.136 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
07:54:05.137 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
07:54:05.137 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)
07:54:05.137 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:266)
07:54:05.137 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:135)
07:54:05.138 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:95)
07:54:05.138 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
07:54:05.138 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
07:54:05.138 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
07:54:05.139 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
07:54:05.139 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
07:54:05.139 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
07:54:05.140 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
07:54:05.140 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
07:54:05.140 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
07:54:05.140 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
07:54:05.141 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
07:54:05.141 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
07:54:05.141 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
07:54:05.142 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
07:54:05.142 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
07:54:05.142 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
07:54:05.143 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
07:54:05.143 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
07:54:05.143 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
07:54:05.144 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
07:54:05.144 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
07:54:05.144 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
07:54:05.144 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
07:54:05.145 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
07:54:05.145 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
07:54:05.145 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
07:54:05.145 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
07:54:05.146 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
07:54:05.146 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
07:54:05.146 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
07:54:05.147 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
07:54:05.147 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
07:54:05.147 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
07:54:05.148 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
07:54:05.148 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command 'cmd'' finished with non-zero exit value 1
07:54:05.148 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:361)
07:54:05.149 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:31)
07:54:05.149 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.Exec.exec(Exec.java:63)
07:54:05.149 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
07:54:05.149 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
07:54:05.150 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
07:54:05.150 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
07:54:05.150 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
07:54:05.150 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
07:54:05.151 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
07:54:05.151 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
07:54:05.151 [ERROR] [org.gradle.BuildExceptionReporter] ... 52 more
Problem is there is no indication as to where it expects the keystore to be by default. I have tried putting the keystore in a .android\debug.keystore under JENKINS_HOME directory. I have also tried to put a calabash_settings file (and also a .calabash_settings file) with the following:
{"keystore_location":"C:\\Program Files (x86)\\Jenkins\\.android\\debug.keystore","keystore_password":"android","keystore_alias":"androiddebugkey"}
I have found one issue to be that the gradle-calabash-android-plugin that I use in my build.gradle does not specify "-v" or "--verbose" to the calabash-gradle command that it spawns. I have created a fork and a pull request with a change to the gradle-calabash-android-plugin project to address this issue: github.com/Pedlar/gradle-calabash-android-plugin/pull/6
After I use the new version of gradle-calabash-android-plugin I got useful debug output:
15:29:02.455 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'cmd''
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - JDK found on PATH.
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - JDK found at: C:\Program Files\Java\jdk1.8.0
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - Android SDK found at: C:\AndroidSDK\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk
15:29:03.608 [QUIET] [system.out] No test server found for this combination of app and calabash version. Recreating test server.
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - "\Program Files\Java\jdk1.8.0\bin/keytool.exe" -v -printcert -J"-Dfile.encoding=utf-8" -file "C:/Windows/Temp/d20140423-5912-102klgo/META-INF/CERT.RSA"
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - MD5 fingerprint for signing cert (C:/Users/jenkins/.jenkins/jobs/Toasty/workspace/build/apk/workspace-debug-unaligned.apk): 11:FC:53:97:85:19:6C:2F:FA:AF:00:B4:DC:A1:68:1E
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - C:/Users/jenkins/.jenkins/jobs/Toasty/workspace/build/apk/workspace-debug-unaligned.apk was signed with a certificate with fingerprint 11:FC:53:97:85:19:6C:2F:FA:AF:00:B4:DC:A1:68:1E
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - Trying to read keystore from: C:/Windows/system32/config/systemprofile/.android/debug.keystore - no such file
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - Trying to read keystore from: C:/Users/jenkins/.jenkins/jobs/Toasty/workspace/debug.keystore - no such file
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - Trying to read keystore from: C:/Windows/system32/config/systemprofile/.local/share/Xamarin/Mono/ for/ Android/debug.keystore - no such file
15:29:03.608 [QUIET] [system.out] 2014-04-23 15:29:03 - Trying to read keystore from: C:/Windows/system32/config/systemprofile/AppData/Local/Xamarin/Mono for Android/debug.keystore - no such file
15:29:03.608 [QUIET] [system.out] No keystores found.
Now I am not sure why calabash-android is trying to read the keystore from "C:/Windows/system32/config/systemprofile/.android/debug.keystore" instead of "C:/Users/jenkins/.android/debug.keystore". I have jenkins running as a windows system service using the login credentials for a user named jenkins on the server.
So I added a file C:\Windows\system32\config\systemprofile.android\debug.keystore. Still getting the same error which is odd.
I am new to developing on windows platform so it could be something as trivial as a silly white space or slash direction issue but I have not been able to figure it out. Thanks for any help.
It turns out that most of my original problem stemmed from the fact that I had installed Jenkins as a service that ran as the Local System Account (see LogOn Tab in Service Properties). This was causing Jenkins to read / write stuff in various system directories and probably running into some permission issues.
The solution was to:
Delete the jenkins windows service
Create a jenkins local account on the server
Login as new jenkins user and install jenkins all over again this time as jenkins user
When configuring jenkins sure make sure to use Service Properties / LogOn / This Account / .\jenkins
Make sure to restart the service after all is done
It is the last step that I had forgotten to do in the end - Doh! Once I did that all is well!
We found the same today with Jenkins 2.9 under Windows 10.
Gradle tries to download artifacts into \Windows\System32\config\systemprofile.gradle\caches\modules-2\files-2.1\ , and fails.
I think this a Jenkins issue, and not Calabash related only.
The Jenkins service is installed to run as "Local System" by default. As Farrukh Najmi found out, this causes the problem.
You can later reconfigure Jenkins to run as another user.
In fact, I wonder whether you should generally do this. Jenkins as LocalSystem is considered a security issue (https://jenkins-ci.org/issue/27016).
Still, Jenkins must not be re-installed as suggested before:
How to reconfigure Jenkins to run as User "Brian"
(From an Admin Terminal or Powershell)
sc.exe stop jenkins
sc.exe config "jenkins" obj= ".\Brian" password= "Brianspassword"
sc.exe start jenkins
...Done.
(Care for the surprising spaces after "=" in the sc.exe syntax.)
Hints
With my first attempt, the service start failed with
Error 1069 "The service did not start due to a logon failure."
Reason: The user may not have granted the rights to run a service, see https://serverfault.com/questions/197881/sc-exe-create-service-password-issue
This is especially the case with any fresh system User we made just for Jenkins.
Solution: My simplest solution was to run services.msc, right-click the Service in the GUI, select Properties. Modify the users password here.
Now, as a side effect, Services.msc is kind enough to grant the missing right to the user. It informs you with a popup dialog.
Another trap are special characters in the password, which need to be escaped in the shell. (I'd go with a letter-only password. Or again, type the password in the GUI of services.msc.)
Related
i'm getting this error after i converted list view to recycler view in my layout and i changed the adapter from base adapter to recycler view adapter
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
thats the what i m getting in log
14:38:32.582 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:transformClassesWithDexForDebug'
14:38:32.582 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :app:transformClassesWithDexForDebug FAILED
14:38:32.584 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:transformClassesWithDexForDebug (Thread[main,5,main]) completed. Took 41.484 secs.
14:38:32.584 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 2 mins 9.57 secs, idle: 0.244 secs
14:38:32.598 [ERROR] [org.gradle.BuildExceptionReporter]
14:38:32.599 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:38:32.600 [ERROR] [org.gradle.BuildExceptionReporter]
14:38:32.600 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:38:32.600 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:transformClassesWithDexForDebug'.
14:38:32.600 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
14:38:32.601 [ERROR] [org.gradle.BuildExceptionReporter]
14:38:32.601 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:38:32.603 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexForDebug'.
14:38:32.604 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
14:38:32.604 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
14:38:32.605 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
14:38:32.606 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
14:38:32.606 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
14:38:32.606 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
14:38:32.606 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62)
14:38:32.607 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
14:38:32.607 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
14:38:32.607 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
14:38:32.607 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
14:38:32.608 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
14:38:32.613 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
i tried to clean my project and i have added mutlidex support for my project
any help ?
Have you try:
Build->Make Project
Build->Make Module 'app'
Build->Clean Project
Build->Rebuild Project
Please post your gradle file
Maybe this could help you.
I had the same problem and changing all the tags:
annotationProcessor
(grade app file)
for:
kapt
It worked for me
After trying every things available on this issue with no luck
i have fixed my problem rollback my adapter classes to their original state and create new classes, i know that's not a solution but i couldn't fix this in another way
I had the same error. I got rid of this error by putting this line to the gradle.properties file.
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
It was already in this file. I just had to remove the comment symbol in front of it.
I'm trying to migrate my app from eclipse to Android Studio. I did not use import feature, creating project based on very simple one. I managed to successfully build project but I got next error when I try to run my app.
AGPBI: {"kind":"simple","text":"Uncaught translation error: com.android.dex.util.ExceptionWithContext","sources":[{}]}
AGPBI: {"kind":"simple","text":"1 error; aborting","sources":[{}]}
I see similar errors with Google search but I could not find a fix for this issue.
My build.gradle looks like this. (I removed signingConfigs.)
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "net.dailytimer.imadoco"
minSdkVersion 9
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFile 'C:/Android/AndroidStudioProjects/imadoco/document/proguard-project.txt'
signingConfig signingConfigs.config
}
}
productFlavors {
free {
versionCode 30800
versionName '3.08.0'
applicationId 'net.DailyTimer.imadocoFree'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/acra-4.6.1.jar')
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:support-v4:23.1.0'
}
I tried with --stacktrace and --debug option to get more logs, but not helped.
19:32:19.775 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:dexFreeDebug'
19:32:19.775 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :app:dexFreeDebug FAILED
19:32:19.776 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:dexFreeDebug (Thread[Daemon worker Thread 32,5,main]) completed. Took 6.205 secs.
19:32:19.776 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 32,5,main]] finished, busy: 10.137 secs, idle: 0.032 secs
19:32:19.777 [ERROR] [org.gradle.BuildExceptionReporter]
19:32:19.778 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
19:32:19.778 [ERROR] [org.gradle.BuildExceptionReporter]
19:32:19.778 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
19:32:19.778 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:dexFreeDebug'.
19:32:19.778 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1
19:32:19.779 [ERROR] [org.gradle.BuildExceptionReporter]
19:32:19.779 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
19:32:19.779 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:dexFreeDebug'.
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
19:32:19.780 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
19:32:19.781 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
19:32:19.782 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
19:32:19.788 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
19:32:19.795 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
19:32:19.796 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
19:32:19.796 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
19:32:19.796 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
19:32:19.796 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
19:32:19.796 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
19:32:19.797 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
19:32:19.797 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
19:32:19.797 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:54)
19:32:19.797 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
19:32:19.797 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
19:32:19.798 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
19:32:19.798 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:49)
19:32:19.798 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
19:32:19.798 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.799 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
19:32:19.799 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.799 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
19:32:19.800 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.800 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
19:32:19.800 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.800 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.Swapper.swap(Swapper.java:38)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.801 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
19:32:19.802 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
19:32:19.803 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
19:32:19.803 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
19:32:19.803 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
19:32:19.803 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
19:32:19.803 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1
19:32:19.804 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:45)
19:32:19.804 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
19:32:19.804 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:243)
19:32:19.804 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
19:32:19.804 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:230)
19:32:19.805 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
19:32:19.805 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
19:32:19.805 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
19:32:19.806 [ERROR] [org.gradle.BuildExceptionReporter] ... 57 more
19:32:19.806 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1
19:32:19.806 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:42)
19:32:19.806 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.core.AndroidBuilder.convertByteCode(AndroidBuilder.java:1276)
19:32:19.807 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.core.AndroidBuilder$convertByteCode$7.call(Unknown Source)
19:32:19.807 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.Dex.doTaskAction(Dex.groovy:165)
19:32:19.807 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.Dex.this$6$doTaskAction(Dex.groovy)
19:32:19.807 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.Dex$this$6$doTaskAction.callCurrent(Unknown Source)
19:32:19.807 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.Dex.taskAction(Dex.groovy:99)
19:32:19.808 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
19:32:19.808 [ERROR] [org.gradle.BuildExceptionReporter] ... 63 more
19:32:19.808 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1
19:32:19.808 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)
19:32:19.808 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:40)
19:32:19.809 [ERROR] [org.gradle.BuildExceptionReporter] ... 70 more
19:32:19.809 [ERROR] [org.gradle.BuildExceptionReporter]
Any help is welcome.
[Edit 1]
I checked log output and it seems problem is related to support-annotations... which I don't know about. But experts may find it useful.
processing archive C:\Android\AndroidStudioProjects\imadoco\app\build\intermediates\pre-dexed\free\debug\support-annotations-23.1.0-24c46cbde714be0842274322039416f341dd73a0.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource android/
ignored resource android/support/
ignored resource android/support/annotation/
processing classes.dex...
23:07:52.739 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"simple","text":"Uncaught translation error: com.android.dex.util.ExceptionWithContext","sources":[{}]}
1 error; aborting
23:07:52.739 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:dexFreeDebug'
23:07:52.739 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :app:dexFreeDebug FAILED
23:07:52.740 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:dexFreeDebug (Thread[Daemon worker Thread 5,5,main]) completed. Took 3.06 secs.
23:07:52.740 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 5,5,main]] finished, busy: 6.815 secs, idle: 0.025 secs
23:07:52.741 [ERROR] [org.gradle.BuildExceptionReporter]
23:07:52.741 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
23:07:52.741 [ERROR] [org.gradle.BuildExceptionReporter]
23:07:52.741 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
23:07:52.742 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:dexFreeDebug'.
23:07:52.742 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1
[Edit 2]
I added support-annotations library as it seems to be linked too after googling about "support-annotions" but it did not help. Exact same error persisted.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/acra-4.6.1.jar')
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:support-annotations:23.1.0'
}
[Edit 3]
Since java.exe is returning error to Gradle, java.exe should know the place/file which found error. But there is no log from java.exe itself. I checked Gradle documentation but could not find a way to let get logs (standard output?) of java.exe. How can I do this? I guess that error message may lead me to the right place to look at.
[Edit 4]
I found this thread and I checked code style shown below.
if (BuildConfig.DEBUG)
{
myView.setOnClickListener(new View.OnClickListener()
{
#Override
public void onClick(View v) {
// Do something
}
});
}
I had many lines of code that will be deleted by optimization, using static final variable (like BuildConfig.DEBUG) to control code behavior depending on build mode like debug/release, free/paid. But I could not find same pattern that the thread pointed as an issue.
Finally I could find a solution. This answer saved my life.
In my case, I have code below which is a cause of this annoying issue.
private class MyLicenseCheckerCallback implements LicenseCheckerCallback
{
public void allow()
{
And making this class public fixed this.
public class MyLicenseCheckerCallback implements LicenseCheckerCallback
{
public void allow()
{
Just one word, "private" in one file caused that issue and since build system didn't give any hint where we should look at, it was very hard to fix. I googled a lot and I saw that answer only in one thread in SO. Without that answer, I could not fix this issue. Thanks Johny_G and this community.
For those who suffer from same issue, first commit current code to any VCS then try search and replace word "private" to "public" in one bulk operation (using good editor) and build/run. If issue goes away, put few files back to previous one and build/run to see what file has key "private".
I've hand this issue crop up twice recently. Last time I found something somewhere on here that mentioned anonymous classes getting optimised out (this answer: https://stackoverflow.com/a/22010135/2214006). For me, this error was fixed by adjusting such a block of code.
eg.
if (BuildConfig.DEBUG) {
query.findInBackground(new FindCallback<ParseObject>() {
// etc
});
}
Would cause this error when building a release version. Attempting to make it work by assigning it to a variable first didn't help as it was still optimised out:
if (BuildConfig.DEBUG) {
FindCallback<ParseObject> findHandler = new FindCallback<ParseObject>() {
// etc
};
query.findInBackground(findHandler);
}
I didn't want it created when BuildConfig.DEBUG was false, so I put it in a separate class:
private class FindHandler implements FindCallback<ParseObject> {
//etc
}
Then in the main part of my code:
if (BuildConfig.DEBUG) {
query.findInBackground(new FindHandler());
}
Also happens when you add annotation processors as compile dependencies. They should be provided.
For example, I had:
compiled 'frankiesardo:icepick-processor:3.2.0'
which should be:
provided 'frankiesardo:icepick-processor:3.2.0'
Gradle doesn't build my android project.
Gradle version: 1.12
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Ivy: 2.2.0
JVM: 1.7.0_51 (Oracle Corporation 24.51-b03)
OS: Mac OS X 10.9.3 x86_64
--stacktrace
./gradlew build --stacktrace
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug
FAILURE: Build failed with an exception.
* Exception is:
org.gradle.api.UncheckedIOException: java.io.IOException: Argument list too long
at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:57)
at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:34)
at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:24)
at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:51)
at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:28)
at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$1.run(DefaultFileCollectionSnapshotter.java:53)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:193)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:58)
at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:49)
at org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter.snapshot(OutputFilesCollectionSnapshotter.java:89)
at org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter.snapshot(OutputFilesCollectionSnapshotter.java:43)
at org.gradle.api.internal.changedetection.rules.OutputFilesStateChangeRule.create(OutputFilesStateChangeRule.java:34)
at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:45)
at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:126)
at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:69)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Argument list too long
at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:47)
... 62 more
BUILD FAILED
--debug
./gradlew build --debug
...
Determining if task ':app:packageDebug' is up-to-date
16:01:04.488 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:packageDebug'
16:01:04.489 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:packageDebug (Thread[main,5,main]) completed. Took 0.073 secs.
16:01:04.489 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 2.373 secs, idle: 0.019 secs
16:01:04.493 [ERROR] [org.gradle.BuildExceptionReporter]
16:01:04.493 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:01:04.494 [ERROR] [org.gradle.BuildExceptionReporter]
16:01:04.494 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
16:01:04.494 [ERROR] [org.gradle.BuildExceptionReporter] java.io.IOException: Argument list too long
16:01:04.495 [ERROR] [org.gradle.BuildExceptionReporter] > Argument list too long
16:01:04.496 [ERROR] [org.gradle.BuildExceptionReporter]
16:01:04.497 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
16:01:04.498 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.UncheckedIOException: java.io.IOException: Argument list too long
16:01:04.498 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:57)
16:01:04.498 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:34)
16:01:04.499 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:24)
16:01:04.499 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:51)
16:01:04.499 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:28)
16:01:04.500 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$1.run(DefaultFileCollectionSnapshotter.java:53)
16:01:04.500 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
16:01:04.500 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
16:01:04.501 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
16:01:04.501 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
16:01:04.502 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:193)
16:01:04.502 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:58)
16:01:04.502 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:49)
16:01:04.503 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter.snapshot(OutputFilesCollectionSnapshotter.java:89)
16:01:04.503 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter.snapshot(OutputFilesCollectionSnapshotter.java:43)
16:01:04.504 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.rules.OutputFilesStateChangeRule.create(OutputFilesStateChangeRule.java:34)
16:01:04.504 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:45)
16:01:04.504 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:126)
16:01:04.505 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:69)
16:01:04.505 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
16:01:04.505 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
16:01:04.506 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
16:01:04.506 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
16:01:04.506 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
16:01:04.506 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
16:01:04.507 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
16:01:04.507 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
16:01:04.507 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
16:01:04.508 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
16:01:04.508 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
16:01:04.508 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
16:01:04.509 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
16:01:04.509 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
16:01:04.509 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
16:01:04.509 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
16:01:04.510 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
16:01:04.510 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
16:01:04.510 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
16:01:04.511 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
16:01:04.511 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
16:01:04.511 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
16:01:04.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
16:01:04.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
16:01:04.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
16:01:04.512 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
16:01:04.513 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
16:01:04.513 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
16:01:04.513 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
16:01:04.514 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
16:01:04.514 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
16:01:04.514 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
16:01:04.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
16:01:04.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
16:01:04.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
16:01:04.515 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
16:01:04.516 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
16:01:04.516 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
16:01:04.516 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
16:01:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
16:01:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
16:01:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
16:01:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
16:01:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
16:01:04.518 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOException: Argument list too long
16:01:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:47)
16:01:04.519 [ERROR] [org.gradle.BuildExceptionReporter] ... 62 more
16:01:04.519 [ERROR] [org.gradle.BuildExceptionReporter]
16:01:04.519 [LIFECYCLE] [org.gradle.BuildResultLogger]
16:01:04.520 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
16:01:04.520 [LIFECYCLE] [org.gradle.BuildResultLogger]
16:01:04.520 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 7.203 secs
16:01:04.522 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
16:01:04.522 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
16:01:04.524 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (/Users/shandrakovag/.gradle/caches/modules-2/metadata-2.6/module-metadata.bin)
16:01:04.525 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (/Users/shandrakovag/.gradle/caches/modules-2/metadata-2.6/artifact-at-repository.bin)
16:01:04.526 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/shandrakovag/.gradle/caches/modules-2).
16:01:04.527 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for settings file '/Volumes/STORAGE/projects/PaintKiller2/settings.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/settings_434o119u0k3mm6r0riat1uocnh/SettingsScript/buildscript).
16:01:04.527 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for settings file '/Volumes/STORAGE/projects/PaintKiller2/settings.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/settings_434o119u0k3mm6r0riat1uocnh/SettingsScript/no_buildscript).
16:01:04.527 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/Volumes/STORAGE/projects/PaintKiller2/build.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/build_3vlps59vafaf2u0q63a0kfufmh/ProjectScript/buildscript).
16:01:04.528 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/Volumes/STORAGE/projects/PaintKiller2/build.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/build_3vlps59vafaf2u0q63a0kfufmh/ProjectScript/no_buildscript).
16:01:04.528 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/Volumes/STORAGE/projects/PaintKiller2/app/build.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/build_1b2srmfc014qjbp9qi1gmue3j2/ProjectScript/buildscript).
16:01:04.529 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/Volumes/STORAGE/projects/PaintKiller2/app/build.gradle' (/Users/shandrakovag/.gradle/caches/1.12/scripts/build_1b2srmfc014qjbp9qi1gmue3j2/ProjectScript/no_buildscript).
16:01:04.540 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (/Volumes/STORAGE/projects/PaintKiller2/.gradle/1.12/taskArtifacts/taskArtifacts.bin)
16:01:04.541 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (/Volumes/STORAGE/projects/PaintKiller2/.gradle/1.12/taskArtifacts/fileSnapshots.bin)
16:01:04.541 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFileStates.bin (/Volumes/STORAGE/projects/PaintKiller2/.gradle/1.12/taskArtifacts/outputFileStates.bin)
16:01:04.541 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/Volumes/STORAGE/projects/PaintKiller2/.gradle/1.12/taskArtifacts/fileHashes.bin)
16:01:04.542 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (/Volumes/STORAGE/projects/PaintKiller2/.gradle/1.12/taskArtifacts).
16:01:04.544 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryDependencyMetadataCache] In-memory dependency metadata cache closed. Repos cached: 13, cache instances: 3, modules served from cache: 0, artifacts: 0
16:01:04.545 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 2 (avg: 0.0 secs, total: 0.001 secs)
16:01:04.546 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolved configuration cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
16:01:04.546 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.001 secs
In my situation gradle started build project after cleaning (Android Studio/Build/Clean Project).
I am just migrating from eclipse to Android Studio. I used Eclipse plugin to convert eclipse project on Android studio. Upto this everything is working fine.
Now I wanted to migrate my unit tests to android studio, and I am trying to find code coverage using jacoco, but I am getting error
org.gradle.api.UnknownTaskException: Task with path 'testDebug' not found in project
Following is my gradle file:
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':AndroidLibraryDist')
compile project(':flatfile')
}
android {
compileSdkVersion 16
buildToolsVersion '20'
signingConfigs {
release {
storeFile file("../../keystore/example.keystore")
storePassword "example2013"
keyAlias "example"
keyPassword "example2013"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_5
}
buildTypes {
release {
signingConfig signingConfigs.release
}
debug{
testCoverageEnabled = true
}
}
lintOptions {
checkReleaseBuilds true
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('src/test')
androidTest.setRoot('src/test')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.7.1.201405082137"
}
def coverageSourceDirs = [
'../myapp/src/example/qoos'
]
task jacocoTestReport(type: JacocoReport, dependsOn: "testDebug") {
group = "Reporting"
description = "Generate Jacoco coverage reports"
classDirectories = fileTree(
dir: '../qris_application/build/intermediates/classes/debug',
excludes: ['**/R.class',
'**/R$*.class',
'**/Manifest*.*']
)
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files('../myapp/build/jacoco/testDebug.exec')
reports {
xml.enabled = true
html.enabled = true
}
}
Following is the log of ./gradlew tasks --debug
12:09:04.194 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':tasks'.
12:09:04.196 [QUIET] [org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated]
12:09:04.197 [QUIET] [org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated] ------------------------------------------------------------
12:09:04.198 [QUIET] [org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated] All tasks runnable from root project
12:09:04.199 [QUIET] [org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated] ------------------------------------------------------------
12:09:04.200 [QUIET] [org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated]
12:09:04.311 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/AndroidLibraryDist/build/intermediates/pre-dexed/test/debug', not found
12:09:04.354 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver] Resolving configuration ':myapp:androidJacocoAgent'
12:09:04.356 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryDependencyMetadataCache] Reusing in-memory cache for repo 'MavenRepo' [e9d03b7c6586155fbee8fb2de8b5b149].
12:09:04.357 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryDependencyMetadataCache] Reusing in-memory cache for repo 'maven' [450f3ea4d3e5f3091b9d1a6643050b0c].
12:09:04.359 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryDependencyMetadataCache] Reusing in-memory cache for repo 'maven2' [1dabf6a944ce7d2e9d4a95e5791f7d19].
12:09:04.360 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration qris:myapp:unspecified(androidJacocoAgent).
12:09:04.361 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting dependency qris:myapp:unspecified(androidJacocoAgent) -> org.jacoco:org.jacoco.agent:0.6.2.201302030002(dependency: org.jacoco#org.jacoco.agent;0.6.2.201302030002 {androidJacocoAgent=[default]})
12:09:04.362 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Selecting new module version org.jacoco:org.jacoco.agent:0.6.2.201302030002
12:09:04.363 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Attempting to resolve module 'org.jacoco:org.jacoco.agent:0.6.2.201302030002' using repositories [MavenRepo, maven, maven2]
12:09:04.469 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.IvyXmlModuleDescriptorParser] post 1.3 ivy file: using exact as default matcher
12:09:04.471 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository] Using cached module metadata for module 'org.jacoco#org.jacoco.agent;0.6.2.201302030002' in 'MavenRepo'
12:09:04.472 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Using module 'org.jacoco:org.jacoco.agent:0.6.2.201302030002' from repository 'MavenRepo'
12:09:04.473 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration org.jacoco:org.jacoco.agent:0.6.2.201302030002(default).
12:09:04.476 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Attaching qris:myapp:unspecified(androidJacocoAgent) to its parents.
12:09:04.477 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Attaching org.jacoco:org.jacoco.agent:0.6.2.201302030002(default) to its parents.
12:09:04.477 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder] Flushing resolved configuration data in Binary store in /tmp/gradle8492831003563620392.bin. Wrote root qris:myapp:unspecified:androidJacocoAgent.
12:09:04.478 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository] Found artifact 'org.jacoco:org.jacoco.agent:0.6.2.201302030002:org.jacoco.agent.jar' in resolver cache: /home/yuvi/.gradle/caches/modules-2/files-2.1/org.jacoco/org.jacoco.agent/0.6.2.201302030002/4261aa79d35d5a8c06386fa745cf4447b1deb259/org.jacoco.agent-0.6.2.201302030002.jar
12:09:04.484 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/myapp/build/intermediates/pre-dexed/release', not found
12:09:04.508 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/AndroidLibraryDist/build/intermediates/pre-dexed/test/debug', not found
12:09:04.518 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/AndroidLibraryDist/build/intermediates/pre-dexed/test/debug', not found
12:09:04.545 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/AndroidLibraryDist/build/intermediates/pre-dexed/test/debug', not found
12:09:04.679 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/flatfile/build/intermediates/pre-dexed/test/debug', not found
12:09:04.710 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/myapp/build/intermediates/pre-dexed/release', not found
12:09:04.732 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/flatfile/build/intermediates/pre-dexed/test/debug', not found
12:09:04.741 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/flatfile/build/intermediates/pre-dexed/test/debug', not found
12:09:04.763 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/flatfile/build/intermediates/pre-dexed/test/debug', not found
12:09:04.813 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/myapp/build/intermediates/pre-dexed/release', not found
12:09:04.819 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/home/yuvi/workspace/Comm_box/qris/myapp/build/intermediates/pre-dexed/test/debug', not found
12:09:04.841 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':tasks'
12:09:04.842 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :tasks FAILED
12:09:04.843 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :tasks (Thread[main,5,main]) completed. Took 0.664 secs.
12:09:04.844 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 0.664 secs, idle: 0.0040 secs
12:09:04.851 [ERROR] [org.gradle.BuildExceptionReporter]
12:09:04.852 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:09:04.853 [ERROR] [org.gradle.BuildExceptionReporter]
12:09:04.855 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
12:09:04.855 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':tasks'.
12:09:04.857 [ERROR] [org.gradle.BuildExceptionReporter] > Could not determine the dependencies of task ':myapp:jacocoTestReport'.
12:09:04.880 [ERROR] [org.gradle.BuildExceptionReporter]
12:09:04.881 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
12:09:04.882 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':tasks'.
12:09:04.883 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
12:09:04.884 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
12:09:04.885 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
12:09:04.885 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
12:09:04.886 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
12:09:04.886 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
12:09:04.887 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
12:09:04.887 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
12:09:04.887 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
12:09:04.888 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
12:09:04.888 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
12:09:04.889 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
12:09:04.889 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
12:09:04.890 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
12:09:04.890 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
12:09:04.891 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
12:09:04.892 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
12:09:04.893 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
12:09:04.893 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
12:09:04.894 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
12:09:04.894 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
12:09:04.895 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
12:09:04.895 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
12:09:04.895 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
12:09:04.896 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
12:09:04.896 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
12:09:04.896 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
12:09:04.897 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
12:09:04.897 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
12:09:04.898 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
12:09:04.898 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
12:09:04.910 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
12:09:04.911 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
12:09:04.911 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
12:09:04.912 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
12:09:04.912 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
12:09:04.913 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
12:09:04.913 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
12:09:04.914 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
12:09:04.914 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
12:09:04.914 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
12:09:04.915 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
12:09:04.915 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
12:09:04.915 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
12:09:04.916 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
12:09:04.916 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
12:09:04.917 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
12:09:04.917 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.GradleException: Could not determine the dependencies of task ':myapp:jacocoTestReport'.
12:09:04.918 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:65)
12:09:04.918 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.AbstractTaskDependency.getDependencies(AbstractTaskDependency.java:27)
12:09:04.918 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskContainer$1.getNodeValues(DefaultTaskContainer.java:210)
12:09:04.919 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskContainer$1.getNodeValues(DefaultTaskContainer.java:208)
12:09:04.919 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:200)
12:09:04.920 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112)
12:09:04.920 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64)
12:09:04.920 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskContainer.actualize(DefaultTaskContainer.java:208)
12:09:04.935 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.diagnostics.TaskReportTask.generate(TaskReportTask.java:72)
12:09:04.936 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.diagnostics.AbstractReportTask.generate(AbstractReportTask.java:67)
12:09:04.936 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
12:09:04.937 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
12:09:04.937 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
12:09:04.938 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
12:09:04.938 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
12:09:04.938 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
12:09:04.939 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
12:09:04.939 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
12:09:04.940 [ERROR] [org.gradle.BuildExceptionReporter] ... 46 more
12:09:04.940 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.UnknownTaskException: Task with path 'testDebug' not found in project ':myapp'.
12:09:04.941 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskContainer.getByPath(DefaultTaskContainer.java:182)
12:09:04.941 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskContainer.resolveTask(DefaultTaskContainer.java:176)
12:09:04.942 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.DefaultTaskDependency.resolve(DefaultTaskDependency.java:84)
12:09:04.942 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:86)
12:09:04.942 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:200)
12:09:04.943 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112)
12:09:04.943 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64)
12:09:04.944 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.doResolve(CachingTaskDependencyResolveContext.java:74)
12:09:04.944 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:63)
12:09:04.945 [ERROR] [org.gradle.BuildExceptionReporter] ... 63 more
12:09:04.945 [ERROR] [org.gradle.BuildExceptionReporter]
12:09:04.945 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:09:04.946 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:09:04.946 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:09:04.947 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 7.518 secs
Try running ./gradlew clean assemble before running your command as recommended here
I newly installed Android studio 0.4.6 on windows 8.
On creating a new project or importing one i am getting the "Gradle Project sync failed".
I tried the following to no avail.
Invalidate caches/restart.
Delete .gradle from user home directory and let it auto download.
Delete all the .iml and .idea folders.
Downgraded to jdk 1.7.
Reduced heap size.
Completely uninstalled and deleted all files of AS and reinstalled.
Updated gradle-wrapper.properties to 1.10.Gave a local path to gradle and also build.gradle to 0.9+.
Still the same error "Gradle Project sync failed"
Does anybody know any other things I can try?
EDIT:
I removed the extra bracket from build.gradle and these are the new errors that i got.
14.503 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.
01:18:14.514 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.j
ava:69)
01:18:14.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
01:18:14.529 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExe
cuter.java:35)
01:18:14.539 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
01:18:14.546 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
01:18:14.554 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecu
ter.java:42)
01:18:14.564 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.ja
va:52)
01:18:14.571 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
01:18:14.578 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.ja
va:43)
01:18:14.586 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
01:18:14.594 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecuto
r.java:79)
01:18:14.601 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecuto
r.java:63)
01:18:14.608 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:5
1)
01:18:14.617 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
01:18:14.625 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
01:18:14.634 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)
01:18:14.641 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:266)
01:18:14.655 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore
.java:135)
01:18:14.662 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(Default
TaskArtifactStateCacheAccess.java:95)
01:18:14.669 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
01:18:14.675 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
01:18:14.684 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
01:18:14.693 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
01:18:14.699 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
01:18:14.706 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
01:18:14.713 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
01:18:14.723 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
01:18:14.731 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
01:18:14.737 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
01:18:14.746 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
01:18:14.753 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
01:18:14.760 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.
java:64)
01:18:14.767 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
01:18:14.774 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
01:18:14.783 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
01:18:14.792 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
01:18:14.799 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
01:18:14.806 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
01:18:14.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201
)
01:18:14.823 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174
)
01:18:14.832 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
01:18:14.839 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
01:18:14.846 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
01:18:14.854 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
01:18:14.862 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
01:18:14.868 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
01:18:14.875 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
01:18:14.885 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
01:18:14.893 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
01:18:14.899 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
01:18:14.906 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
01:18:14.913 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
01:18:14.923 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
01:18:14.930 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.internal.LoggedErrorException: Failed to run c
ommand:
C:\Users\shreZ~\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4.2\aapt.exe package -v -f --no-crunch -I C:\Users\shreZ~\AppData\Local\Android\android-st
udio\sdk\platforms\android-19\android.jar -M C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\manifests\debug\AndroidManifest.xml -S C:\Users\shreZ~\AndroidStudioP
rojects\MyApplication2\app\build\res\all\debug -A C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\assets\debug -m -J C:\Users\shreZ~\AndroidStudioProjects\MyAppli
cation2\app\build\source\r\debug -F C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\libs\app-debug.ap_ --debug-mode --custom-package com.example.myapplication2.ap
p --output-text-symbols C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\symbols\debug
Error Code:
-1073741816
01:18:14.939 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
01:18:14.948 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:66)
01:18:14.957 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(An
notationProcessingTaskFactory.java:236)
01:18:14.964 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(Annotat
ionProcessingTaskFactory.java:212)
01:18:14.971 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(Anno
tationProcessingTaskFactory.java:223)
01:18:14.978 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(Annotat
ionProcessingTaskFactory.java:201)
01:18:14.986 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
01:18:14.993 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
01:18:15.000 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.ja
va:80)
01:18:15.007 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.j
ava:61)
01:18:15.014 [ERROR] [org.gradle.BuildExceptionReporter] ... 52 more
01:18:15.025 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\shreZ~\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4.2\aapt.exe package -v -f --no-crunch -I C:\Users\shreZ~\AppData\Local\Android\android-st
udio\sdk\platforms\android-19\android.jar -M C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\manifests\debug\AndroidManifest.xml -S C:\Users\shreZ~\AndroidStudioP
rojects\MyApplication2\app\build\res\all\debug -A C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\assets\debug -m -J C:\Users\shreZ~\AndroidStudioProjects\MyAppli
cation2\app\build\source\r\debug -F C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\libs\app-debug.ap_ --debug-mode --custom-package com.example.myapplication2.ap
p --output-text-symbols C:\Users\shreZ~\AndroidStudioProjects\MyApplication2\app\build\symbols\debug
Error Code:
-1073741816
01:18:15.033 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.ide.common.internal.CommandLineRunner.runCmdLine(CommandLineRunner.java:98)
01:18:15.041 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.ide.common.internal.CommandLineRunner.runCmdLine(CommandLineRunner.java:69)
01:18:15.048 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.AndroidBuilder.processResources(AndroidBuilder.java:736)
01:18:15.058 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.AndroidBuilder$processResources.call(Unknown Source)
01:18:15.066 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.groovy:95)
01:18:15.074 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:64)
01:18:15.081 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
01:18:15.091 [ERROR] [org.gradle.BuildExceptionReporter] ... 60 more
01:18:15.100 [ERROR] [org.gradle.BuildExceptionReporter]
01:18:15.109 [LIFECYCLE] [org.gradle.BuildResultLogger]
01:18:15.117 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
01:18:15.127 [LIFECYCLE] [org.gradle.BuildResultLogger]
01:18:15.138 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 32.027 secs
Based on the error message, there's a syntax error in your build.gradle file: an extra closing brace at line 6. Delete that brace, resynchronize your project, and if there are still errors that you can't figure out, post your full build.gradle file in your question.
Go to File -> Settings -> Build,Execution,Deployment -> Click on Gradle -> Use local gradle distribution -> Select the exact location of your Gradle folder -> click apply then OK.
After that , if gradle sync still fails. Do a small little change in your build.gradle(Module:app) file (for example, put a space anywhere and remove it back). Studio will ask to syn your gradle file, Click on "Sync Now" on the top right corner of the screen.
This will sync your gradle properly.