Ad

Cannot Find Symbol Class Error In Kotlin Databinding With KOIN + Room In Android Studio 3.2.1 9 Oct, 2018 Build

I was working on old android studio with gradle plugin 3.2.0 with KOIN and Room in MVVM Design Pattern.

Yesterday I had Updated my Android Studio to New Version 3.2.1, And after that when i am trying to compile my project I am getting Following Error.

error: cannot find symbol

protected TimeLineBind(DataBindingComponent _bindingComponent, View _root, int _localFieldCount,

  • I tried resolving by my Side and I have applied many solutions and also better one from Here but still i am unable to figure out the issue. I have tried migrating back to old Gradle 3.2.0 - i was working on, But still facing the same error.

  • I have also tried android.databinding.enableV2 = true solution,

but it didn't worked. I am wondering if anyone can help. I can update anything you want.

Ad

Answer

i have found resolution myself. The room Annotations was causing the problem and I was getting the error Regarding Data binding.

So, Every-time when you spawn with an error, Not necessary that you are having an error with Data Binding thing, But There is something else causing this error or Warning, And it is stopping Data binding Classes to be Generated.

=>All Data Binding Classes are generated at the End When Compilation get Completed Successfully without Errors & Warnings.

==>Try Lint Check and Fix all possible errors and Warnings that you think may Cause a Problem, And after that try Compiling again.

===> Since Gradle 3.2.1 - Stable i confirm that there is no need to add any kapt-compiler dependency in gradle tor annotation processing, it is added automatically by gradle when Gradle is on Stable Version.

For Ex. ->kapt 'com.android.databinding:compiler:x.x.x' - Remove all this

====> add android.databinding.enableV2=true in gradle.properties file

Ad
source: stackoverflow.com
Ad