Android databinding kotlin A failure occurred while executing org. Jetbrains. Kotlin. Gradle. Internal. KaptExecution compiler error lookup

Most of the time with databinding, the error location is not directly displayed when editing APK

Such as e: [kapt] An exception occurred: android. Databinding. Tool. Util. LoggedErrorException: failure, see logs for details.

Using Gradle debug mode makes it easier to find unreadable databinding errors

/ / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

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

This error is the most pit daddy, wasted five hours of my working time, direct run only reported this error, without any error place hint

 

 

 

After a variety of operations, and do not want to restore to the last code,(there are more modifications this time, the last modification of the restoration did not work), and finally in the second day when the most sober torturing solution

 

 

Add the — stacktrace-info parameter first

Repack and run

I finally got an error

File code error. It just popped up

 

Modify gradle.properties in the root directory of your project. This file can modify JVM running parameters for the compilation process, such as maximum running memory, heap size, etc. Build one if you don’t have one.

Org.gradle. jvmargs= -dfile. encoding=UTF-8

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx3096m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
MobSDK.spEdition=FP
android.enableResourceOptimizations=false
Copy the code