janheinrichmerker/material-intro

Error with databinding.MiActivityIntroBinding

OtavioMiguel19 opened this issue ยท 19 comments

I had this erros today. How to solve it?

[...]
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vidroid.com.br.apps.organizze.pro/com.vidroid.com.br.apps.organizze.pro.activity.start.SliderActivity}: java.lang.ClassCastException: com.vidroid.com.br.apps.organizze.pro.databinding.MiActivityIntroBindingImpl cannot be cast to com.heinrichreimersoftware.materialintro.databinding.MiActivityIntroBinding
[...]
Caused by: java.lang.ClassCastException: com.vidroid.com.br.apps.organizze.pro.databinding.MiActivityIntroBindingImpl cannot be cast to com.heinrichreimersoftware.materialintro.databinding.MiActivityIntroBinding
        at com.heinrichreimersoftware.materialintro.app.IntroActivity.onCreate(IntroActivity.java:198)
        at com.vidroid.com.br.apps.organizze.pro.activity.start.SliderActivity.onCreate(SliderActivity.java:31)
[...]

I already read the articles 1 and 2. The solutions didn't work to me.

I have a similar issue. Could not resolve constraint layout after migrating to androidX. An example binding code is attached below.

@NonNull
    public final android.widget.ImageButton miButtonNext;
    @NonNull
    public final android.support.constraint.ConstraintLayout miFrame;
    @NonNull
    public final com.heinrichreimersoftware.materialintro.view.FadeableViewPager miPager;

The constrain layout is now part of androidX

@dev4vin I solved it using the 1.6 version of Material Intro. Try it.

I have tried 1.6, unfortunately, gradle could not resolve it.

implementation 'com.heinrichreimersoftware:material-intro:1.6'

@OtavioMiguel19 It resolved eventually, it was a problem with gradle.
Thanks.

Thanks @OtavioMiguel19 but this must be fixed soon! Looks like the last release was more than a one and a half years ago!! ๐Ÿ˜ฒ Is this project abandoned or is it still actively developed?

It is a reeeally good question @abhijitvalluri ! It should at least receive new updates with Android and the new Material Components UI, with bug fixes and new features...

I would like to know if the devs are going to develop more in this project.

Got the same problem after I've updated AS to 3.2...

I am using 1.6.2 and I am facing the mentioned issue

Error with databinding.MiActivityIntroBinding

If I use v1.6, There is no problem
Can you explain?

Same to me with 1.6.2!

The same issue is here with some more info: #256

Same issue with 1.6.2, fixed with 1.6. Waiting for fix to have link support in descriptions (from 1.6.1)

#266 should resolve the AndroidX issues.
Until it's merged, I'll be using implementation 'com.github.adrcotfas:material-intro:e1228' which points to the last commit on my branch.

I had the same issue, and I just manage to solve it. https://stackoverflow.com/questions/55024316/java-lang-classcastexception-for-include-tag-using-databinding/
In your case, IntroActivity needs to be defined in library/AndroidManifest.xml file.

Resolvi meu problema com a versรฃo 1.6

@matheuslipk Can you please write in english as everyone here?

Resolvi meu problema com a versรฃo 1.6

@matheuslipk says, I solved my problem with version 1.6

@dev4vin I solved it using the 1.6 version of Material Intro. Try it.

useful๏ผ

This should now be resolved with Release 2.0.0.

Yay!! ๐Ÿ‘ ๐Ÿ˜„