[Solve] a failure occurred while executing org.jetbrains.kotlin.gradle.internal.kaptexecution

In this paragraph Discous of a failure occurred while executing org.jetbrains.kotlin.gradle.internal.kaptexecution. a lot off user problems with this error. follow these methods and get your error solved.

when you can face this error please check these details logs.

* 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.

a failure occurred while executing org.jetbrains.kotlin.gradle.internal.kaptexecution

Fast option,

public abstract class BaseStateActivity<T extends androidx.databinding.ViewDataBinding, E extends xxxx.BaseVM> extends xxxxx.BaseVMActivity<T> implements xxxxx.IBindVm<E> {错误: 非法的类型开始
public abstract class BaseStateActivity<T extends androidx.databinding.ViewDataBinding, E extends xxxxx.BaseVM> extends xxxxx.BaseVMActivity<T> implements xxxxx.IBindVm<E> {错误: 需要’;’
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)

Second case

Databinding syntax error
Click ‘run with — stacktrace’ to get the following logs.

Caused by: android.databinding.tool.util.LoggedErrorException: Found data binding error(s):
[databinding] {“msg”:”Syntax error: no viable alternative at input u0027u003cEOFu003eu0027″,”file”:”appsrcmainreslayoutfragment_employment_info.xml”,”pos”:[{“line0″:54,”col0″:41,”line1″:54,”col1”:44}]}

its  XML and found an error:

This is my custom two-way binding, so it looks different

Third case

The Java class has the same name as the kotlin class,Click ‘run with — stacktrace’ to get the following logs:

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing …
Caused by: java.lang.reflect.InvocationTargetException
Caused by: com.sun.tools.javac.util.ClientCodeException: java.lang.IllegalStateException: node.sym must not be null
Caused by: java.lang.IllegalStateException: node.sym must not be null

Just change the class name and rebuild it.

source: android questions

Author Details

admin photo

sobuj033@gmail.com

Sobuj Ali

Founder & CEO

Sobuj Ali is Founder & CEO at Apkpm.com. I have a good knowledge of Marketing. So I provide all Technology information on their website.

Leave a Reply

Your email address will not be published.

Your Rating: