siralam/LoopingViewPager

Kotlin Support

mahmoud-elnaggar opened this issue · 1 comments

Is this Library supporting Kotlin ?

I got this error on my Kotlin Project

kapt3/stubs/debug/com/ayk/home/ui/adapters/SliderAdapter.java:6: error: cannot access PagerAdapter
public final class SliderAdapter extends com.asksira.loopingviewpager.LoopingPagerAdapter<documents.SlidesQuery.Slide> {
^
class file for androidx.viewpager.widget.PagerAdapter not found
13:37:35.396 [ERROR] [org.gradle.api.Task] e: java.lang.IllegalStateException: failed to analyze: java.lang.AssertionError: annotation tree hasn't been attributed yet: @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000P\n.....'"}, d2 = {"Lcom/ayk/home/ui/adapters/SliderAdapter;", "Lcom/asksira/loopingviewpager/LoopingPagerAdapter;", "Ldocuments/SlidesQuery$Slide;", "slides", "", "mContext", "Landroid/content/Context;", "onSlideItemClicked", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "url", "", "(Ljava/util/List;Landroid/content/Context;Lkotlin/jvm/functions/Function1;)V", "getMContext", "()Landroid/content/Context;", "setMContext", "(Landroid/content/Context;)V", "getOnSlideItemClicked", "()Lkotlin/jvm/functions/Function1;", "setOnSlideItemClicked", "(Lkotlin/jvm/functions/Function1;)V", "getSlides", "()Ljava/util/List;", "setSlides", "(Ljava/util/List;)V", "bindView", "convertView", "Landroid/view/View;", "listPosition", "", "viewType", "inflateView", "container", "Landroid/view/ViewGroup;", "setItems", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "app_debug"})

I am sorry but I found that I forgot that I merged the PR #15 which includes migrating the project to AndroidX. It means the user of this library needs to migrate their project to AndroidX as well.

So this has nothing to do with Kotlin but due to AndroidX instead.