0

I've recently started developing using Kotlin. I've just learnt about data binding, but I'm not able to enable data binding.

I searched on the internet and it was pretty clear at majority of places that I had to enable it explicitly using "kapt" plugin of kotlin and update the dependencies.

So, I applied as it was recommended.

apply plugin: 'kotlin-kapt'

android {
   ...
   dataBinding {
       enabled true
   }
}


dependencies {
   ...
   kapt 'com.android.databinding:compiler:3.6.3'
}

The error is :

Task :app:kaptDebugKotlin FAILED

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

I have Android gradle plugin version 3.6.3 and gradle version 5.6.4.

Tanjim Ahmed Khan
  • 650
  • 1
  • 9
  • 21
  • Does this answer your question? [How do I run/test my Flutter app on a real device?](https://stackoverflow.com/questions/54444538/how-do-i-run-test-my-flutter-app-on-a-real-device) – Nicolas May 19 '20 at 13:39
  • The dependancy may not be needed. – ACR May 19 '20 at 15:31
  • I tried it on both, the AVD manager android studio provides and my android device too, still same error. I feel that the problem lies somewhere in the plugin thing, still can't figure out – codingb0y101 May 19 '20 at 15:34
  • Tried it without dependency too, still didn't work – codingb0y101 May 19 '20 at 15:35

0 Answers0