Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataBinderMapperImpl() is not generated #72

Closed
novotnyfra opened this issue Apr 5, 2018 · 7 comments
Closed

DataBinderMapperImpl() is not generated #72

novotnyfra opened this issue Apr 5, 2018 · 7 comments

Comments

@novotnyfra
Copy link

General information

  • SDK/Library version: 3.3.0
  • Gradle Plugin Version: 3.1.0

Issue description

com.braintreepayments.api.DataBinderMapperImpl() is not generated when using Data Binding Compiler V2.

Error:
error: cannot find symbol addMapper(new com.braintreepayments.api.DataBinderMapperImpl()); symbol: class DataBinderMapperImpl location: package com.braintreepayments.api

@rav3n
Copy link

rav3n commented Apr 18, 2018

I have a similar problem
Error:(7, 44) error: cannot find symbol class DataBinderMapperImpl

@bluk
Copy link

bluk commented Apr 18, 2018

Hi, do you have a setting like android.databinding.enableV2=true in your gradle.properties or are you using kotlin-kapt?

@novotnyfra
Copy link
Author

yes, I have Daba Binding Compiler v2 enabled as you mentioned and I!m also using kotlin-kapt.
Drop-in is working when android.databinding.enableV2=false, but it is not the solution.

@MrRexZ
Copy link

MrRexZ commented Apr 23, 2018

I'm getting this issue as well after enabling android.databinding.enableV2=true. Unfortunately for v1 has some bugs in my setup (Android Studio 3.1 stable and gradle 4.4 with latest current build tools) , and I would prefer if v2 is usable.

@sdcoffey
Copy link

Hey y'all,

We were finally able to reproduce this issue. WIll begin working on a fix - just wanted to keep you updated.

@sdcoffey
Copy link

Alright @novotnyfra, @rav3n, @MrRexZ,

I was able to chase this issue down to one of our internal dependencies for braintree_android, specifically our visa checkout dependency, which uses data binding. The issue with databinding v2 is described at a high level in the Android Developer docs.

Specifically, this note:

Note: The new data binding compiler in the Android Plugin version 3.1 is not backwards compatible. You need to generate all your binding classes with this feature enabled to take advantage of incremental compilation. However, the new compiler in the Android Plugin version 3.2 is compatible with binding classes generated with previous versions. The new compiler in version 3.2 is enabled by default.

Because we're building our visa-checkout module with gradle plugin version 3.1, apps that are enabling databinding v2 will not be able to compile any package that pulls in visa-checkout, i.e., braintree-android, and braintree-android-drop-in.

Our recommendation for the time being is to use the workaround described above until version 3.2 of the android gradle plugin is released, at which time we can upgrade our visa checkout library to ensure full backwards compatibility. We can't release a new version in the interim as it may cause undesirable downstream effects for folks using this library.

I'm going to close this issue in favor of this issue in braintree-android-visa-checkout related to updating our gradle plugin.

Thanks for your patience!

@sdcoffey
Copy link

Hey @novotnyfra, @rav3n, @MrRexZ,

Quick update for y'all. @lkorth mentioned to me this morning that there's a workaround for this issue if you're using Braintree 2.12 or above. Just change your dependency in your build.gradle to look like

implementation('com.braintreepayments.api:braintree:2.13.0') {
    exclude group: 'com.braintreepayments.api', module: 'visa-checkout'
}

And it will compile for you. The obvious exception is if you're using VisaCheckout, in which case you'll need to wait for the fix in the above tagged issue. Let me know if that works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants