if you want to remove an article from website contact us from top.

    a failure occurred while executing org.jetbrains.kotlin.gradle.internal.kaptwithoutkotlinctask$kaptexecutionworkaction

    Mohammed

    Guys, does anyone know the answer?

    get a failure occurred while executing org.jetbrains.kotlin.gradle.internal.kaptwithoutkotlinctask$kaptexecutionworkaction from screen.

    Kotlin 1.7.0

    Execution failed for task ':presentation:kaptDebugKotlin'. A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction java.lang.reflect.InvocationTargetException (no error messa...

    New issue Jump to bottom

    Kotlin 1.7.0 - A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction #3425

    Closed

    Drjacky opened this issue · 4 comments

    Comments

    Drjacky commented •

    edited

    Execution failed for task ':presentation:kaptDebugKotlin'.

    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction

    java.lang.reflect.InvocationTargetException (no error message)

    Hilt: 2.40.1 AGP: 7.2.1 Kotlin: 1.7.0

    https://scans.gradle.com/s/mhx6s3m7orxpe

    And Hilt: 2.42:

    Execution failed for task ':app:hiltAggregateDepsDebug'.

    A failure occurred while executing dagger.hilt.android.plugin.task.AggregateDepsTask$WorkerAction

    com.squareup.javapoet.ClassName.canonicalName()Ljava/lang/String;

    Drjacky commented

    And this solution didn't help: https://youtrack.jetbrains.com/issue/KT-45885

    Drjacky commented

    This helped: #3068 (comment)

    Drjacky closed this as completed

    BraisGabin commented

    Related with #3383. I add this comment because this is the first result in google but the issue that fixed my error is in that other issue.

    ZacSweers commented

    @BraisGabin I don't think that's related at all as this is a gradle build classpath issue

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels None yet 3 participants

    स्रोत : github.com

    android

    All of sudden I start getting this error, and I am not getting idea why if anyone just let me know where this error is, will be enough helpful. As much I am able to get is this because of new updat...

    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

    Ask Question

    Asked 2 years, 5 months ago

    Modified 1 month ago

    Viewed 310k times 342

    All of sudden I start getting this error, and I am not getting idea why if anyone just let me know where this error is, will be enough helpful. As much I am able to get is this because of new update of android studio. Detailed summary of error I am getting.

    Task :app:kaptDebugKotlin

    ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1C:\Users\shubh\Downloads\MarginCalculator\app\build\generated\source\kapt\debug\com\kotlin_developer\margincalculator\DataBinderMapperImpl.java:10: error: cannot find symbol

    import com.kotlin_developer.margincalculator.databinding.FragmentCalculatorScreenBindingImpl;

    symbol: class FragmentCalculatorScreenBindingImpl

    Task :app:kaptDebugKotlin FAILED

    location: package com.kotlin_developer.margincalculator.databinding

    FAILURE: Build failed with an exception.

    * What went wrong:

    Execution failed for task ':app:kaptDebugKotlin'.

    > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

    > java.lang.reflect.InvocationTargetException (no error message)

    * Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 17s

    29 actionable tasks: 27 executed, 2 up-to-date

    androidandroid-studiokotlin

    Share

    Improve this question

    edited Oct 9, 2020 at 11:38

    Vadim Kotov 7,8748 8 gold badges 47 47 silver badges 62 62 bronze badges

    asked Jun 1, 2020 at 11:52

    Shubham Tater 3,4582 2 gold badges 12 12 silver badges 10 10 bronze badges

    please show your code in build.gradle file. –

    Sergio

    Jun 1, 2020 at 14:12

    please show DataBinderMapperImpl.java code as well. –

    Sergio

    Jun 2, 2020 at 19:26

    3

    Have you updated to Android Studio 4? same pb here –

    Samuel Eminet

    Jun 3, 2020 at 23:19

    2

    I updated to Android Studio 4 and I've been getting the same error with using Room, I was able to temporarily fix it by changing one of my queries. I initially had this query: "SELECT case_name FROM SavedCases", and then changed it to "SELECT * FROM SavedCases", and the error message went away. For some reason, I only get this error when I try to query only specific columns. This is not an ideal fix for the problem and I hope someone has a better fix. –

    Hani Jun 4, 2020 at 3:17 1

    I had a similar error and found a solution that works for me. You might have done something similar. stackoverflow.com/questions/63133657/… –

    Mustaqode

    Jul 28, 2020 at 17:35

    Show 5 more comments

    58 Answers

    1 2 Next 441

    Android Studio's UI was just hiding the error...

    when the error occurred, it highlighted the item in the list view, and showed an unhelpful message in the terminal view.

    to find the real error, select the root item in the list view so that Android Studio would display the whole build output in the terminal view, then scroll to find error.

    Share Improve this answer

    edited Sep 4, 2020 at 1:15

    answered Aug 21, 2020 at 5:45

    Eric 15.6k7 7 gold badges 65 65 silver badges 71 71 bronze badges 23

    if you have a compile-time Room (DB) error it will show it like that - that means that one or some of your queries is wrong –

    Idan Damri Oct 3, 2020 at 6:42 24

    Judging by the upvotes, the UI decision here is not a good one –

    Daniel Wilson

    Nov 23, 2020 at 16:20

    3

    Only useful answer here as problem can vary! –

    Sunkas

    Apr 23, 2021 at 11:55

    2

    Thanks a lot, man. I was facing the issue, as I didn't add @Dao annotation in my Dao abstract class. –

    Naimul Kabir

    May 20, 2021 at 5:37

    2

    @NaimulKabir thanks. I was missing that too damn Dao. wasted almost 2 hours –

    Qadir Hussain

    Oct 1, 2021 at 19:15

    Show 2 more comments

    107

    Maybe I am a bit late for the answer but, anyways, I was getting the same error. The build failure can be caused by some error that Android Studio fails to point out probably due the the project size being very large.

    Here is the easy way to point out the exact error.

    In Android studio go to Analyze menu and click on Inspect Code; check whole project, click OK and wait for the inspection to finish.

    Now you will see a tab that will point all the errors, warnings etc and you can now resolve the real issue.

    स्रोत : stackoverflow.com

    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution : KT

    Visible to issue readers

    KT-42013 Created by Manish Panwar 2 years ago Updated by Smart Bot 2 years ago

    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

    A failure occured when I update my kotlin version to 1.4.Can anyone help

    Attachments 4 Activity settings

    Ivan Kubyshkin commented 21 Sep 2020 10:34

    Thank you for the report. Can you attach the full stacktrace of the error or your project?

    Manish Panwar commented 21 Sep 2020 13:11

    These are the stacktraces

    Ivan Kubyshkin commented 21 Sep 2020 14:46

    Can you attach the stacktrace as a text, please? Do you use kapt.use.worker.api=true in your project?

    Manish Panwar commented 22 Sep 2020 14:28

    no i donot use kapt.use.worker.api=true in my project

    Manish Panwar commented 22 Sep 2020 14:40

    Executing tasks: [:app:assembleDebug] in project C:\andoidprojectfolder\SleepTracker2

    > Configure project :app

    WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.

    It will be removed in version 5.0 of the Android Gradle plugin.

    > Task :app:preBuild UP-TO-DATE

    > Task :app:preDebugBuild UP-TO-DATE

    > Task :app:compileDebugAidl NO-SOURCE

    > Task :app:generateDebugBuildConfig UP-TO-DATE

    > Task :app:compileDebugRenderscript NO-SOURCE

    > Task :app:writeDebugApplicationId UP-TO-DATE

    > Task :app:generateSafeArgsDebug UP-TO-DATE

    > Task :app:prepareLintJar UP-TO-DATE

    > Task :app:prepareLintJarForPublish UP-TO-DATE

    > Task :app:generateDebugSources UP-TO-DATE

    > Task :app:dataBindingExportBuildInfoDebug UP-TO-DATE

    > Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE

    > Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE

    > Task :app:generateDebugResValues UP-TO-DATE

    > Task :app:generateDebugResources UP-TO-DATE

    > Task :app:dataBindingExportFeaturePackageIdsDebug UP-TO-DATE

    > Task :app:mergeDebugResources UP-TO-DATE

    > Task :app:dataBindingGenBaseClassesDebug UP-TO-DATE

    > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE

    > Task :app:extractDeepLinksDebug UP-TO-DATE

    > Task :app:processDebugManifest

    > Task :app:processDebugResources

    > Task :app:kaptGenerateStubsDebugKotlin UP-TO-DATE

    > Task :app:javaPreCompileDebug UP-TO-DATE

    > Task :app:mergeDebugShaders UP-TO-DATE

    > Task :app:compileDebugShaders NO-SOURCE

    > Task :app:generateDebugAssets UP-TO-DATE

    > Task :app:mergeDebugAssets UP-TO-DATE

    > Task :app:processDebugJavaRes NO-SOURCE

    > Task :app:checkDebugDuplicateClasses UP-TO-DATE

    > Task :app:mergeLibDexDebug

    > Task :app:mergeDebugJniLibFolders UP-TO-DATE

    > Task :app:mergeDebugNativeLibs UP-TO-DATE

    > Task :app:stripDebugDebugSymbols NO-SOURCE

    > Task :app:validateSigningDebug UP-TO-DATE

    > Task :app:kaptDebugKotlin

    ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1C:\andoidprojectfolder\SleepTracker2\app\build\generated\source\kapt\debug\com\example\sleeptracker2\DataBinderMapperImpl.java:10: error: cannot find symbol

    import com.example.sleeptracker2.databinding.FragmentSleepTrackerFragmentBindingImpl;

    ^

    symbol: class FragmentSleepTrackerFragmentBindingImpl

    > Task :app:kaptDebugKotlin FAILED

    > Task :app:mergeExtDexDebug

    location: package com.example.sleeptracker2.databinding

    FAILURE: Build failed with an exception.

    * What went wrong:

    Execution failed for task ':app:kaptDebugKotlin'.

    > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

    > java.lang.reflect.InvocationTargetException (no error message)

    * Try:

    Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Exception is:

    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDebugKotlin'.

    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1()

    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse()

    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid()

    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute()

    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute()

    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute()

    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute()

    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute()

    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute()

    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute()

    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask()

    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call()

    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call()

    स्रोत : youtrack.jetbrains.com

    Do you want to see answer or more ?
    Mohammed 15 day ago
    4

    Guys, does anyone know the answer?

    Click For Answer