skydoves / PowerMenu

:fire: Powerful and modernized popup menu with fully customizable animations.
Apache License 2.0
1.19k stars 175 forks source link

Cannot access 'androidx.lifecycle.FullLifecycleObserver' #106

Closed nicemak closed 1 year ago

nicemak commented 1 year ago

Please complete the following information:

Describe the Bug:

Android studio shows error on setOnMenuItemClickListener

Cannot access 'androidx.lifecycle.FullLifecycleObserver' which is a supertype of 'com.skydoves.powermenu.AbstractPowerMenu'. Check your module classpath for missing

how to solve this issue?

nicemak commented 1 year ago

@skydoves ?

nicemak commented 1 year ago

@skydoves any help?

skydoves commented 1 year ago

@nicemak Would you add the dependency below to your project?

implementation("androidx.lifecycle:lifecycle-common-java8:2.6.1")
skydoves commented 1 year ago

If you still face the issue, you should use the lifecycle version at least 2.6.0 by force. Thanks for reporting this issue!

nicemak commented 1 year ago

@skydoves nothing happened, I have already implemented implementation "androidx.lifecycle:lifecycle-common-java8:2.6.1", I changed it back to 2.6.0 but nothing changes. what to do now?

RobbWatershed commented 1 year ago

Same here - I still have that error showing up everywhere I use PowerMenu even though I've included implementation("androidx.lifecycle:lifecycle-common-java8:2.6.1")

I won't lie - this is getting super annoying to see these red lines on my IDE. Is there anything you can do @skydoves ?

RobbWatershed commented 11 months ago

bump? 😅

TY235 commented 11 months ago

You have to ensure that all your modules' build.gradle files implement implementation("androidx.lifecycle:lifecycle-common-java8:2.6.1"), not just your app-level build.gradle file.

RobbWatershed commented 11 months ago

After all this time, someone has a working fix!! You're my hero @TY235 😍