Execution failed for task ':AndroidSample:compiledebugKotlin'

Hello, trying to compile a test project with gradle https://github.com/JetBrains/kotlin-examples/tree/master/gradle/android-mixed-java-kotlin-project and get an error:

22:02:12.053 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ‘:AndroidSample:compiledebugKotlin’.
22:02:12.054 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.build.gradle.BasePlugin.getRuntimeJarList()Ljava/util/List;
22:02:12.055 [ERROR] [org.gradle.BuildExceptionReporter]
22:02:12.056 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
22:02:12.058 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:AndroidSample:compiledebugKotlin’.
22:02:12.059 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
22:02:12.059 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
22:02:12.060 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
22:02:12.061 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
22:02:12.062 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
22:02:12.067 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
22:02:12.068 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
22:02:12.069 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
22:02:12.071 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
22:02:12.073 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
22:02:12.074 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
22:02:12.075 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
22:02:12.076 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
22:02:12.076 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
22:02:12.077 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
22:02:12.078 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
22:02:12.079 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
22:02:12.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
22:02:12.080 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
22:02:12.081 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
22:02:12.085 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
22:02:12.086 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
22:02:12.086 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
22:02:12.087 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
22:02:12.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
22:02:12.095 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
22:02:12.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
22:02:12.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
22:02:12.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
22:02:12.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
22:02:12.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
22:02:12.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
22:02:12.100 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
22:02:12.101 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
22:02:12.103 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
22:02:12.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
22:02:12.105 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
22:02:12.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
22:02:12.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
22:02:12.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
22:02:12.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
22:02:12.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
22:02:12.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
22:02:12.111 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
22:02:12.112 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.BasePlugin.getRuntimeJarList()Ljava/util/List;
22:02:12.112 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin$processVariants$5.execute(KotlinPlugin.kt:253)
22:02:12.113 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPlugin$processVariants$5.execute(KotlinPlugin.kt)
22:02:12.115 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
22:02:12.116 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
22:02:12.117 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
22:02:12.123 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
22:02:12.124 [ERROR] [org.gradle.BuildExceptionReporter] … 43 more

Gradle version 1.12 com.android.tools.build:gradle - 0.8.3 and 0.10.1 org.jetbrains.kotlin:kotlin-gradle-plugin:0.1-SNAPSHOT and 0.7.271 org.jetbrains.kotlin:kotlin-stdlib:0.1-SNAPSHOT and 0.7.271

please help understand the problem

Unfortunatly, kotlin-gradle plugin is now incompatible with android-gradle plugin 0.10+. You can star this issue to know when it will be fixed - http://youtrack.jetbrains.com/issue/KT-4984

Thanks, I will follow the changes

today tried to assemble:

gradle build
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
:AndroidSample:preBuild
:AndroidSample:compileDebugNdk
:AndroidSample:preDebugBuild
:AndroidSample:checkDebugManifest
:AndroidSample:prepareDebugDependencies
:AndroidSample:compileDebugAidl
:AndroidSample:compileDebugRenderscript
:AndroidSample:generateDebugBuildConfig
:AndroidSample:mergeDebugAssets
:AndroidSample:generateDebugResValues UP-TO-DATE
:AndroidSample:generateDebugResources
:AndroidSample:mergeDebugResources
:AndroidSample:processDebugManifest
:AndroidSample:processDebugResources
:AndroidSample:generateDebugSources
:AndroidSample:compiledebugKotlin
:AndroidSample:compileDebugJava
/home/alexd/Рабочий стол/kotlin-examples-master/gradle/android-mixed-java-kotlin-project/AndroidSample/src/main/java/org/jetbrains/kotlin/gradle/androidsample/MainActivity.java:22: error: cannot find symbol
           Intent myIntent = new Intent(view.getContext(), MainActivity2.class);
                                                           ^
  symbol: class MainActivity2
1 error
:AndroidSample:compileDebugJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:AndroidSample:compileDebugJava’.
    > Compilation failed; see the compiler error output for details.

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

BUILD FAILED

Total time: 7.103 secs


used all the same except:

Hello, Is there MainActivity2 class present? Is it written on kotlin? Are there any errors in IDE?

Use android-mixed-java-kotlin-project to github, the MainActivity2 class is, written in kotlin, tried to collect the console. in the IDE shows that there are no errors, sees all classes, but gives the same error



[Снимок экрана от 2014-05-19 14:33:48.png|attachment](upload://zLsuXVCK8uwiBxbikYrBIO6zWrq.png) (282 KB)