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

Databinding cast that crashes the app? #256

Closed
ghost opened this issue Aug 12, 2018 · 27 comments
Closed

Databinding cast that crashes the app? #256

ghost opened this issue Aug 12, 2018 · 27 comments

Comments

@ghost
Copy link

ghost commented Aug 12, 2018

Hey there,
Whenever I attempt to extend to app/IntroActivity class, i get this weird exception that seems to be casting the bindings generated for my package and the library's package? It crashes the app.

Caused by: java.lang.ClassCastException: me.morgy.fish.databinding.MiActivityIntroBindingImpl cannot be cast to com.heinrichreimersoftware.materialintro.databinding.MiActivityIntroBinding

@ghost
Copy link
Author

ghost commented Aug 12, 2018

wait what the fuck i didn't realize i had another class with the same name omg ._.

@ghost ghost closed this as completed Aug 12, 2018
@ghost ghost reopened this Aug 12, 2018
@ghost
Copy link
Author

ghost commented Aug 12, 2018

Wait a min i saw wrongly there is a issue rip

@haliyari
Copy link

i have the same problem

@chimbori
Copy link
Collaborator

chimbori commented Sep 8, 2018

See also #257 .

This crash has recently started to happen with 100% reproducibility. I suspect it might be related to upgrading Gradle from 4.4 to 4.6 as recommended by the latest version of Android Studio 3.1.4 & unexpected interactions with Data Binding.

I see that work is already underway to remove the dependency on Data Binding (c60b78d), which would be awesome, because having a library add a dependency for trivial task seems like overkill.

Is there a plan to issue a new release without data binding, which would side-step this issue?

Or, if not, then is there a plan for a surgical fix to avoid these crashes for everyone using the library with the latest Android Studio + Gradle versions? Thanks!

@chimbori chimbori mentioned this issue Sep 8, 2018
@chimbori
Copy link
Collaborator

chimbori commented Sep 8, 2018

Until this is fixed, reverting to version 1.6 seems to be an acceptable workaround. Documenting in case others find this useful!

@edotassi
Copy link

any news?

@doilio
Copy link

doilio commented Sep 25, 2018

Same error here. any updates on how to fix this?

@ghost
Copy link
Author

ghost commented Sep 25, 2018

I'll leave a pr after exams, I should be able to fix this

@Inversion-NL
Copy link

Until this is fixed, reverting to version 1.6 seems to be an acceptable workaround. Documenting in case others find this useful!

Updating to 1.6 didn't help.
Currently running 1.5.8 looks like it did the trick.

Thanks for the library!

@ferrannp
Copy link

Wop! Having this issue in all my devices. What is actually happening?

@AnuthaDev
Copy link

I am getting exactly this error. It wwas working fine before with AS 3.1.4, Gradle 4.1, AGP 3.1.4. But today, I updated to AS 3.2, Gradle 4.6, AGP 3.2.0 and it started giving errors... Please someone fix this.

@EpsilonOrionis
Copy link

Please fix

@akashpathak
Copy link

Anyone have a work around? Downgrading to 1.5.8 did not work for me.

@Unpublished
Copy link

Updating to latest master commit (com.heinrichreimersoftware:material-intro:7221502f1f) solves it but may be unstable.

@AnuthaDev
Copy link

I downgraded to 1.6 with Gradle 4.6 and it worked for me

@doilio
Copy link

doilio commented Sep 30, 2018

I downgraded to 1.6 with Gradle 4.6 and it worked for me

implementation 'com.heinrichreimersoftware:material-intro:1.6'
So far, It's Working for me as well. No luck with 1.6.1

@captainepoch
Copy link

With AS 3.2, Kotlin 1.2.71 and Gradle 4.6, the downgrade to the 1.6 seems to be a hack to get it working

@ferrannp
Copy link

Yeah although version 1.6.0 has more bugs than 1.6.1 (like wrong button colors on Lollipop).

@Spiderbezno
Copy link

Spiderbezno commented Oct 17, 2018

I have the same problem since I updated to Gradle version, is there any fix?

@philbour
Copy link

This is causing my app to crash for all my users, since I updated android studio and gradle. Really need it fixed

@allato
Copy link

allato commented Oct 24, 2018

Updating to latest master commit (com.heinrichreimersoftware:material-intro:7221502f1f) solves it but may be unstable.

Could you TAG last commit with a new subversion to update every project?
Tnk for your job

@anisias
Copy link

anisias commented Nov 2, 2018

I tried different options listed above and what worked for me is this combination:

  • implementation 'com.heinrichreimersoftware:material-intro:1.6.2'
  • classpath 'com.android.tools.build:gradle:3.2.1'
  • Gradle 4.4

@simonesessa
Copy link

Works with gradle 4,4 and 'com.android.tools.build:gradle:3.1.0'.
Is there a fix for gradle 4.6?

@Aym9n
Copy link

Aym9n commented Nov 25, 2018

Same here
Downgraded library to 1.6 with Gradle 4.6 and it worked.
any fixes for 1.6.2?

@msahil432
Copy link

Using 1.6, solved my issue.
I am using AS 3.3 and com.android.tools.build:gradle:3.3.0

@VladimirWrites
Copy link

#261 (comment)

@chimbori
Copy link
Collaborator

Data binding dependency has been removed, thanks @meierjan : ebc6b71

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