daimajia / daimajia/AndroidImageSlider

Error inflating class com.daimajia.slider.library.SliderLayout

Open
#432 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I have been trying to inflate this SliderLayout in a Fragment. I am getting this error. So please help me to resolve this error.
Binary XML file line #8 in : Error inflating class com.daimajia.slider.library.SliderLayout
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.daimajia.slider.library.Tricks.InfiniteViewPager.setAdapter(androidx.viewpager.widget.PagerAdapter)' on a null object reference

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the XML inflation from the reported Fragment and inspect SliderLayout together with Tricks.InfiniteViewPager, starting at the XML line 8 failure and the setAdapter call in the stack trace. Trace why InfiniteViewPager is null and verify that the SliderLayout inflates successfully without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.