Software⏱️ 2 min read📅 2026-05-30

How to Fix: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

ANTLR Tool version mismatch in Android Studio

Quick Answer: Update Android Studio to the latest version or downgrade ANTLR tool to match the current runtime version.

The error you're encountering is due to a mismatch between the version of the ANTLR tool used for code generation and the current runtime version. This issue typically arises after updating Android Studio, as you've mentioned.

🔍 Why This Happens

  • [Cause]

🔧 Proven Troubleshooting Steps

Method 1: Update ANTLR Tool Version

  1. Step 1: Open the Android Studio terminal and run the command `gradle :app:kaptDebugKotlin` to check the current ANTLR tool version.

Method 2: Update Gradle Script

  1. Step 1: Open the `build.gradle` file and update the `kapt` configuration to use the correct ANTLR tool version, for example: `kapt 'org.jetbrains.kotlin:compiler:1.6.10'`.

💡 Conclusion

By following these steps, you should be able to resolve the issue and get your project running smoothly again.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions