janheinrichmerker / material-intro

A simple material design app intro with cool animations and a fluent API.
https://jitpack.io/#com.heinrichreimer/material-intro
MIT License
1.74k stars 305 forks source link

Error with databinding.MiActivityIntroBinding #261

Closed OtavioMiguel19 closed 5 years ago

OtavioMiguel19 commented 6 years ago

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.

p-vincen-t commented 6 years ago

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

OtavioMiguel19 commented 6 years ago

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

p-vincen-t commented 6 years ago

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

implementation 'com.heinrichreimersoftware:material-intro:1.6'
p-vincen-t commented 6 years ago

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

abhijitvalluri commented 6 years ago

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?

OtavioMiguel19 commented 6 years ago

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.

Mauker1 commented 6 years ago

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

bewithdhanu commented 6 years ago

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?

chrisonline commented 6 years ago

Same to me with 1.6.2!

chrisonline commented 6 years ago

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

DenisGL commented 6 years ago

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

adrcotfas commented 5 years ago

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.

VladimirWrites commented 5 years ago

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.

matheuslipk commented 5 years ago

Resolvi meu problema com a versão 1.6

chrisonline commented 5 years ago

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

bewithdhanu commented 5 years ago

Resolvi meu problema com a versão 1.6

@matheuslipk says, I solved my problem with version 1.6

TangLiuRain commented 5 years ago

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

useful!

chimbori commented 5 years ago

This should now be resolved with Release 2.0.0.

abhijitvalluri commented 5 years ago

Yay!! 👍 😄