DataBinderMapperImpl not generated

#42 · closed · 9 comments

View on GitHub ↗

veresvit

Hi, I am getting following error when I attempt to use the library in my project. Library version 2.3.0 Android Studio: 3.1 Canary 8 Compile SDK 27 Gradle and KAPT version: 3.1.0-alpha08 ` :app:javaPreCompileDebug UP-TO-DATE C:\pahttoproject\app\build\generated\source\kapt\debug\android\databinding\DataBinderMapperImpl.java:7: error: cannot find symbol addMapper(new com.github.nitrico.lastadapter.DataBinderMapperImpl()); ^ symbol: class DataBinderMapperImpl location: package com.github.nitrico.lastadapter 1 error :app:compileDebugJavaWithJavac FAILED ` Thank you :)

Comments

veresvit

In addition I discovered that the problem occurs only when the new V2 binding compiler is enabled by gradle.properties with this parameter: **android.databinding.enableV2=true**

nitrico

The library does not support the new `android.databinding.enableV2` yet but it will when the final version of it is released.

dakuenjery

Can I somehow use this now? Is there a workaround? I use android studio: 3.1 beta 3.

nitrico

It should work. It does work fine for me. Are you using the latest versions of Gradle (4.5.1), the Gradle plugin (3.1.0-beta3), etc.?

kirtan403

Okay, It's out now. But I am facing this problem with AS 3.1 Any workarounds?

nitrico

@kirtan403 it works fine for me using: Android Studio 3.1 Android Gradle plugin version 3.1.0 Gradle 4.6 LastAdapter 2.3.0 If you used some flags like `android.databinding.enableV2=true` with the alpha/beta version of Android Studio 3.1, please remove them. Otherwise, the problem should be something else.

kirtan403

It worked after I removed kapt databinding compiler. Thanks !

veresvit

@kirtan403 Wouldn't recommend this solution - you might need it eventualy :) Check your file `gradle.properties` whether there is no extra binding setting as nitrico mentioned here https://github.com/nitrico/LastAdapter/issues/42#issuecomment-377831473 . and gradle-wrapper.properties that you have `distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip`

kirtan403

@veresvit No, I haven't added anything in `gradle.properties`. And in 3.1 there is no need of explicitly applying kapt databinding dependency. So removing that dependency is just fine and applying kotlin-kapt plugin makes everything works fine.