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.
Related
Error:11:25:12.400 [ERROR] [org.gradle.BuildExceptionReporter]
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] **FAILURE: Build failed with an exception.**
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter]
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] * **What went wrong:**
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] **java.lang.NullPointerException (no error message)**
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter]
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] *** Exception is:**
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] **java.lang.NullPointerException**
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.TreeSnapshotRepository.removeTreeSnapshotUsage(TreeSnapshotRepository.java:85)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheBackedFileSnapshotRepository.remove(CacheBackedFileSnapshotRepository.java:47)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1$1.run(CacheBackedTaskHistoryRepository.java:84)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
11:25:12.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:60)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1.update(CacheBackedTaskHistoryRepository.java:66)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:135)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:68)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
11:25:12.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
11:25:12.403 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
11:25:12.403 [ERROR] [org.gradle.BuildExceptionReporter]
I ran into this issue after macOS crashed due to a kernel panic during a build of the Android project having this issue.
It appears that this is most likely caused by a corrupt gradle cache. You can solve this by doing the following:
Close Android Studio
Run gradlew --stop to ensure no gradle daemon is still running
Delete the .gradle folder at the root of your project
Open Android Studio and rebuild
Source: https://code.google.com/p/android/issues/detail?id=220741#c13
I have run into trouble while using this support by google described here: Building C++ in Android Studio with CMake or ndk-build
I have a ndk project structured in android.mk, and it can build successfully with the 'ndk-build' command.
While I add this:
externalNativeBuild{
ndkBuild{
path "src/main/jni/Android.mk"
}
}
problem occurred. Here is the log:
15:05:02.630 [INFO] [org.gradle.api.Project] External native build debug: done executing ndkBuild
15:05:02.630 [INFO] [org.gradle.api.Project] External native build debug: write build output output /Users/benny/workspace/android/myproject/mymodule/externalNativeBuild/ndkBuild/debug/mips64/ndkBuild_build_output.txt
15:05:02.669 [INFO] [org.gradle.api.Project] External native build debug: parse and convert ndk-build output to build configuration JSON
15:05:10.034 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':mymodule:generateJsonModelDebug'
15:05:10.034 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :mymodule:generateJsonModelDebug FAILED
15:05:10.034 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :mymodule:generateJsonModelDebug (Thread[main,5,main]) completed. Took 25.263 secs.
15:05:10.035 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 35.685 secs, idle: 0.17 secs
15:05:10.040 [ERROR] [org.gradle.BuildExceptionReporter]
15:05:10.042 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:05:10.042 [ERROR] [org.gradle.BuildExceptionReporter]
15:05:10.043 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:05:10.043 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':mymodule:generateJsonModelDebug'.
15:05:10.043 [ERROR] [org.gradle.BuildExceptionReporter] > #/Users/benny/workspace/android/myproject/mymodule/build/intermediates/ndkBuild/debug/obj/local/mips64/objs/navi/archiver.list
15:05:10.044 [ERROR] [org.gradle.BuildExceptionReporter]
15:05:10.044 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:05:10.045 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mymodule:generateJsonModelDebug'.
15:05:10.045 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
15:05:10.045 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
15:05:10.045 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
15:05:10.046 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:05:10.060 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
15:05:10.060 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
15:05:10.077 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
15:05:10.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
15:05:10.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
15:05:10.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
15:05:10.081 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
15:05:10.082 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
15:05:10.118 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:48)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
15:05:10.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: #/Users/benny/workspace/android/myproject/mymodule/build/intermediates/ndkBuild/debug/obj/local/mips64/objs/navi/archiver.list
15:05:10.120 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.external.gnumake.CommandClassifier$GccArBuildTool.checkValidInput(CommandClassifier.java:92)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.external.gnumake.CommandClassifier$GccArBuildTool.createCommand(CommandClassifier.java:127)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.external.gnumake.CommandClassifier.classify(CommandClassifier.java:56)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.external.gnumake.FlowAnalyzer.analyze(FlowAnalyzer.java:46)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.external.gnumake.NativeBuildConfigValueBuilder.addCommands(NativeBuildConfigValueBuilder.java:98)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.NdkBuildExternalNativeJsonGenerator.processBuildOutput(NdkBuildExternalNativeJsonGenerator.java:74)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.buildAndPropagateException(ExternalNativeJsonGenerator.java:246)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.build(ExternalNativeJsonGenerator.java:162)
15:05:10.121 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.ExternalNativeBuildJsonTask.build(ExternalNativeBuildJsonTask.java:39)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
15:05:10.164 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
15:05:10.165 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
15:05:10.165 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
15:05:10.165 [ERROR] [org.gradle.BuildExceptionReporter] ... 60 more
15:05:10.165 [ERROR] [org.gradle.BuildExceptionReporter]
15:05:10.165 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:05:10.165 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
15:05:10.165 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:05:10.166 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 1 mins 12.017 secs
Btw, I have updated my Android Studio to 2.2 preview 4.
Thank you in advance.
I was able to continue by switching to Android NDK r12 for a similar issue.
If you are using MacOS + homebrew, then run "brew update && brew upgrade android-ndk".
Also ensure to have "ndk.dir" set in local.properties. This should help if there are multiple NDK installations on your machine.
modify "APP_STL:=stlport_static" to "APP_STL := c++_shared" in Application.mk locating in jni folder can solve the problem.
I recently downloaded the newest Android Studio 1.0 release and immediately began going through hell to try to get a new project up and running. I created a new Maps Project and as soon as I go to run, it gives me the following:
Waiting for device.
Target device: motorola-xt1063-ZX1D3226RL
Uploading file
local path: C:\Users\Rich\Desktop\WebProjects\AndroidStudioProjects\BlocWork\BlocSpot\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.richluick.blocspot
Local path doesn't exist.
Now, I realize that there are similar questions out there, but nothing I try is working. I updated the .iml file like most people have suggested:
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="APK_PATH" value="/build/apk/blocspot-debug-unaligned.apk" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
That isnt working for me. As others also sugested I tried the gradlew clean packagedebug --debug command and got the following:
14:34:14.187 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.190 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:34:14.198 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.200 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:34:14.202 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.NullPointerException (no error message)
14:34:14.204 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.207 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:34:14.210 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.NullPointerException
I have no understanding as to why or how a Null Pointer Exception is being thrown when compiling he gradle. I have been working on this for hours and I just cannot get this to work. I hope somebody can help me with this. The stacktrace from the error is below.
14:34:14.212 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreDexCache.createItemNode(PreDexCache.java:189)
14:34:14.214 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreDexCache.createItemNode(PreDexCache.java:60)
14:34:14.216 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache.saveItems(PreProcessCache.java:486)
14:34:14.218 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache.clear(PreProcessCache.java:375)
14:34:14.220 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache$clear$0.call(Unknown Source)
14:34:14.222 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
14:34:14.224 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
14:34:14.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
14:34:14.229 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$_configureProject_closure1.doCall(BasePlugin.groovy:318)
14:34:14.231 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.232 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.234 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.236 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.237 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
14:34:14.239 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
14:34:14.241 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278)
14:34:14.243 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
14:34:14.245 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.Closure.call(Closure.java:423)
14:34:14.246 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
14:34:14.248 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
14:34:14.250 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
14:34:14.251 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
14:34:14.254 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
14:34:14.257 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.proxy.$Proxy12.buildFinished(Unknown Source)
14:34:14.259 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:111)
14:34:14.262 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
14:34:14.264 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
14:34:14.268 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
14:34:14.270 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
14:34:14.272 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
14:34:14.276 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
14:34:14.281 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
14:34:14.284 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
14:34:14.287 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
14:34:14.289 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
14:34:14.291 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
14:34:14.293 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
14:34:14.346 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
14:34:14.348 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
14:34:14.351 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
14:34:14.353 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
14:34:14.356 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
14:34:14.576 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
14:34:14.578 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.581 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.583 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.631 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.633 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
14:34:14.636 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
14:34:14.649 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
14:34:14.651 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.653 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.655 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.657 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
14:34:14.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
14:34:14.664 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
14:34:14.669 [ERROR] [org.gradle.BuildExceptionReporter]
Try this. It helped me, FINALLY !!!
close android studio
Download http://goo.gl/v0UPm6
goto \sdk
rename 'tools' to 'tools1' (In case you need backup)
extract this zip to \sdk
it will make tools folder in \sdk
restart studio and errors will be gone
Source: Google Plus
PD: Thank you, Aman ;) PD2: Android SDK Tools 24.0.1 is coming !!!
This is how I solved it:
In application's build.gradle file make sure gradle version is atleast 1.1.0 like this:
classpath 'com.android.tools.build:gradle:1.1.0'
and the repositories section contains mavenCentral() instead of jCentral()
Try the following:
Check for known issues which occurred during the upgrade to 1.0
Verify that your Gradle project files have been properly upgraded
If all else fails, revert to v.0.9.3 found on the Canary channel. Hopefully Google sorts out the issue sooner rather than later.
creation of projects fail in android studio 0.5.2.I have installed gradle 1.11
Error:A problem occurred configuring root project 'MyApplication5'.
>
Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:0.9.+.
Required by:
:MyApplication5:unspecified
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
I have tried so many things that I have found on stack exchange.
Reinstall android studio. invalidate caches, remove .gradle folder, restart android studio and rebuild my project. Change the version to 11 in the distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip. Used local gradle distribution instead of default gradle wrapper in the gradle settings.I always get this same failed message.
gradle-wrapper.properties file:
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
the gradle.build file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Thanks for your help.
UPDATE 1
If I build with --debug I get the following output:
* Exception is:
20:54:34.245 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'MyApplication6'.
20:54:34.246 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
20:54:34.249 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:57)
20:54:34.251 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:507)
20:54:34.252 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:82)
20:54:34.253 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
20:54:34.255 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
20:54:34.257 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
20:54:34.258 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
20:54:34.259 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
20:54:34.260 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
20:54:34.261 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
20:54:34.262 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
20:54:34.264 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
20:54:34.265 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
20:54:34.267 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
20:54:34.268 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
20:54:34.269 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
20:54:34.270 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
20:54:34.271 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
20:54:34.272 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
20:54:34.273 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
20:54:34.274 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
20:54:34.275 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
20:54:34.276 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
20:54:34.288 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
20:54:34.290 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
20:54:34.291 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
20:54:34.292 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':classpath'.
20:54:34.293 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52)
20:54:34.294 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)
20:54:34.295 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDependencyResolver.java:106)
20:54:34.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingArtifactDependencyResolver.java:176)
20:54:34.298 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:465)
20:54:34.299 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:202)
20:54:34.301 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
20:54:34.302 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:75)
20:54:34.303 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:167)
20:54:34.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
20:54:34.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
20:54:34.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
20:54:34.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
20:54:34.309 [ERROR] [org.gradle.BuildExceptionReporter] ... 25 more
20:54:34.311 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:0.9.+.
20:54:34.312 [ERROR] [org.gradle.BuildExceptionReporter] Required by:
20:54:34.313 [ERROR] [org.gradle.BuildExceptionReporter] :MyApplication6:unspecified
20:54:34.314 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.resolve(UserResolverChain.java:67)
20:54:34.315 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:34)
20:54:34.316 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyResolver.resolve(ProjectDependencyResolver.java:48)
20:54:34.317 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$AbstractVersionResolveResult.resolve(LazyDependencyToModuleResolver.java:86)
20:54:34.319 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver.resolve(LazyDependencyToModuleResolver.java:47)
20:54:34.320 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.VersionForcingDependencyToModuleResolver.resolve(VersionForcingDependencyToModuleResolver.java:48)
20:54:34.321 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionSelectorResolveState.resolveModuleRevisionId(DependencyGraphBuilder.java:936)
20:54:34.322 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.resolveModuleRevisionId(DependencyGraphBuilder.java:297)
20:54:34.338 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:94)
20:54:34.340 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:67)
20:54:34.341 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.transform(DefaultDependencyResolver.java:108)
20:54:34.344 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver$1.transform(DefaultDependencyResolver.java:77)
20:54:34.346 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
20:54:34.347 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:77)
20:54:34.348 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:39)
20:54:34.350 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:37)
20:54:34.351 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
20:54:34.353 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:102)
20:54:34.354 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:189)
20:54:34.355 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:61)
20:54:34.356 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:37)
20:54:34.357 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:41)
20:54:34.358 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:51)
20:54:34.360 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:44)
20:54:34.361 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:42)
20:54:34.362 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:240)
20:54:34.363 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:230)
20:54:34.364 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
20:54:34.365 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:463)
20:54:34.367 [ERROR] [org.gradle.BuildExceptionReporter] ... 33 more
20:54:34.368 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
20:54:34.369 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
20:54:34.370 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.conn.PoolingClientConnectionManager.requestConnection(PoolingClientConnectionManager.java:186)
20:54:34.371 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
20:54:34.372 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
20:54:34.373 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
20:54:34.374 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:118)
20:54:34.375 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performHttpRequest(HttpClientHelper.java:111)
20:54:34.376 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.executeGetOrHead(HttpClientHelper.java:87)
20:54:34.377 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:78)
20:54:34.378 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:66)
20:54:34.379 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:70)
20:54:34.395 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:46)
20:54:34.397 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.http.HttpResourceAccessor.getResource(HttpResourceAccessor.java:32)
20:54:34.398 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.externalresource.transport.DefaultExternalResourceRepository.getResource(DefaultExternalResourceRepository.java:61)
20:54:34.401 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.MavenMetadataLoader.parseMavenMetadataInfo(MavenMetadataLoader.java:56)
20:54:34.405 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.MavenMetadataLoader.load(MavenMetadataLoader.java:46)
20:54:34.409 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.MavenVersionLister$1.visit(MavenVersionLister.java:44)
20:54:34.412 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ChainedVersionLister$1.visit(ChainedVersionLister.java:49)
20:54:34.413 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.listVersionsForAllPatterns(ExternalResourceResolver.java:322)
20:54:34.414 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findDynamicDependency(ExternalResourceResolver.java:185)
20:54:34.415 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.getDependency(ExternalResourceResolver.java:163)
20:54:34.417 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.getDependency(MavenResolver.java:81)
20:54:34.418 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.getDependency(ExternalResourceResolver.java:157)
20:54:34.419 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository$1.run(CacheLockingModuleVersionRepository.java:46)
20:54:34.420 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
20:54:34.421 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:237)
20:54:34.422 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:308)
20:54:34.423 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:114)
20:54:34.424 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:185)
20:54:34.425 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:57)
20:54:34.426 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository.getDependency(CacheLockingModuleVersionRepository.java:44)
20:54:34.428 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.getDependency(CachingModuleVersionRepository.java:90)
20:54:34.429 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.CachedRepository.getDependency(CachedRepository.java:55)
20:54:34.430 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain$RepositoryResolveState.resolve(UserResolverChain.java:184)
20:54:34.431 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.findLatestModule(UserResolverChain.java:98)
20:54:34.433 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.findLatestModule(UserResolverChain.java:81)
20:54:34.434 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.resolve(UserResolverChain.java:56)
20:54:34.435 [ERROR] [org.gradle.BuildExceptionReporter] ... 61 more
20:54:34.436 [ERROR] [org.gradle.BuildExceptionReporter]
I suspect that the problem here has to do with your Gradle version. The first thing I would recommend is to add a wrapper task to your build file like this:
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
This tells the Gradle tooling that you want to use a specific version of the wrapper. After you add this task, make sure that you execute it by running the task. In the console, and from the directory where your build.gradle file is located, run this:
gradlew wrapper
It is important that you actually run the wrapper task, since just updating the value in the gradle-wrapper.properties file will not actually download your distribution. You can check which distributions have been downloaded by looking in ~/.gradle/wrapper/dists or in C:\Users\yourusername\.gradle\wrapper\dists.
Finally, the last time I checked, Android Studio didn't support Gradle 1.11 yet. Try bumping the gradle version in the wrapper task above down to 1.9 and running the wrapper task again.
Looks like broken slf4j-api JAR in your Gradle installation or maybe you are adding an incompatible version of SLF4J to a classpath somewhere.
I use gradle with the android plugin 0.4.2 to build my project - which works fine - just not on cloudbees - there I get the following error:
07:10:47.168 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'FAST Build'.
07:10:47.169 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
07:10:47.169 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
07:10:47.170 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
07:10:47.171 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
07:10:47.172 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:466)
07:10:47.173 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:77)
07:10:47.173 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
07:10:47.174 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
07:10:47.175 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.Actions$CompositeAction.execute(Actions.java:78)
07:10:47.176 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.Actions$TransformingActionAdapter.execute(Actions.java:130)
07:10:47.177 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:442)
07:10:47.183 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:437)
07:10:47.184 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:40)
07:10:47.184 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
07:10:47.185 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
07:10:47.186 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
07:10:47.187 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
07:10:47.188 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
07:10:47.191 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
07:10:47.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
07:10:47.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
07:10:47.195 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
07:10:47.197 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
07:10:47.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
07:10:47.263 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
07:10:47.264 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
07:10:47.271 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
07:10:47.272 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:48)
07:10:47.273 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
07:10:47.274 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:39)
07:10:47.275 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
07:10:47.277 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
07:10:47.279 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
07:10:47.280 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.plugins.PluginInstantiationException: Could not create plugin of type 'AppPlugin'.
07:10:47.282 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:65)
07:10:47.284 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:106)
07:10:47.286 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:71)
07:10:47.288 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
07:10:47.290 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
07:10:47.292 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
07:10:47.294 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
07:10:47.296 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
07:10:47.299 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:854)
07:10:47.300 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Project$apply.call(Unknown Source)
07:10:47.302 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
07:10:47.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Script$apply.callCurrent(Unknown Source)
07:10:47.306 [ERROR] [org.gradle.BuildExceptionReporter] at build_4qb0i7tbmj7s6d3ji53ui92pv3.run(/scratch/jenkins/workspace/FAST Build/build.gradle:9)
07:10:47.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
07:10:47.309 [ERROR] [org.gradle.BuildExceptionReporter] ... 32 more
07:10:47.311 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: org/gradle/tooling/provider/model/ToolingModelBuilderRegistry
07:10:47.311 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.DependencyInjectingInstantiator.selectConstructor(DependencyInjectingInstantiator.java:97)
07:10:47.312 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:58)
07:10:47.313 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:63)
07:10:47.314 [ERROR] [org.gradle.BuildExceptionReporter] ... 45 more
07:10:47.315 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
07:10:47.316 [ERROR] [org.gradle.BuildExceptionReporter] ... 48 more
07:10:47.317 [ERROR] [org.gradle.BuildExceptionReporter]
I get it for this project:
https://github.com/ligi/FAST
this new documentation now finally shed some light into how to do what I wanted to do
http://developer.cloudbees.com/bin/view/DEV/AndroidGradleBuilds
gradle 1.6 is available on cloudbees, and it's up to user to manage the tools installations to get the adequate versions for job configuration. => http://[account].ci.cloudbees.com/configure