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

Logcat crash error xml #18

Open
osamamohsen opened this issue Oct 15, 2020 · 4 comments
Open

Logcat crash error xml #18

osamamohsen opened this issue Oct 15, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@osamamohsen
Copy link

Process: grand.app.elqasar, PID: 26848
kotlin.TypeCastException: null cannot be cast to non-null type alirezat775.lib.carouselview.CarouselLayoutManager
at alirezat775.lib.carouselview.CarouselView.getManager(CarouselView.kt:77)
at alirezat775.lib.carouselview.CarouselView.getParentAnchor(CarouselView.kt:250)
at alirezat775.lib.carouselview.CarouselView.calculateSnapViewPosition(CarouselView.kt:265)
at alirezat775.lib.carouselview.CarouselView.scrolling(CarouselView.kt:230)
at alirezat775.lib.carouselview.CarouselView$initSnap$1.run(CarouselView.kt:101)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@osamamohsen osamamohsen added the bug Something isn't working label Oct 15, 2020
@alirezat775
Copy link
Owner

Would you please add your implementation?

@bayuwijdev
Copy link

bayuwijdev commented Apr 5, 2022

I have the same issue. I think this is error from library

kotlin.TypeCastException: null cannot be cast to non-null type alirezat775.lib.carouselview.CarouselLayoutManager
at alirezat775.lib.carouselview.CarouselView.getManager(CarouselView.kt:77)
at alirezat775.lib.carouselview.CarouselView.getParentAnchor(CarouselView.kt:250)
at alirezat775.lib.carouselview.CarouselView.calculateSnapViewPosition(CarouselView.kt:265)
at alirezat775.lib.carouselview.CarouselView.scrolling(CarouselView.kt:230)
at alirezat775.lib.carouselview.CarouselView$initSnap$1.run(CarouselView.kt:101)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8059)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

this is my xml implementation on fragment

                        <alirezat775.lib.carouselview.CarouselView
                            android:id="@+id/carousel_view"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:scrollIndicators="bottom"
                            />

@bayuwijdev
Copy link

you need to set variable manager : CarouselLayoutManager? as nullable

@alirezat775
Copy link
Owner

Hi @BayuWijayaPermanaPutra, thanks for asking, however, I couldn’t get your problem, may I ask you to add your implementation and explain the scenario that caused this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants