Closed phazei closed 1 year ago
Hey @phazei, balloon uses lifecycle version 2.6.1, so you need to update the version or exclude only the lifecycle dependency from the balloon like the below:
implementation ("com.github.skydoves:balloon:$balloonVersion") {
exclude group: "androidx.lifecycle"
}
I initially was using 2.6.1, but I saw the closed ticket saying it wasn't supported. But I do get the same issue with both cases.
This is weird. Balloon does not depend on FullLifecycleObserver since it moved to lifecycle 2.6.x. Check out: https://github.com/skydoves/Balloon/issues/419
You may need to clean your cache and sync gradle properly before running your project.
I will close this issue for now. Please let me know if you still face this issue. Thanks!
@skydoves I'm also dealing with a similar issue since upgrading my project to 2.6.x. My app builds and runs despite the warning and invalidating caches does not clear errors.
From a glance, I noticed inheritance is FullLifecycleObserver -> DefaultLifecycleObserver -> Balloon. DefaultLifecycleObserver was converted to Kotlin in 2.6.0, while Balloon 1.5.3 still depends on lifecycle-common-2.5.1
. My guess is both the Kotlin and Java versions of the class are still discoverable, but IntelliJ inspections cannot reflect this accurately.
It's strange that using exclude
does not resolve the error. I also tried to force the latest version of the lifecycle package transitively with no luck. It may again be related to those two separate classes. I would think upgrading to the latest version of lifecycle-common
in Balloon would resolve this issue.
@CSHawley Thanks for your investigation. I feel like this issue comes from the androidx-fragment library, which still uses lifecycle 2.5.1. Let me update androidx libraries in the next release. Thanks!
i had the same problem. by invalidate cache or clean gradle, but nothing solves the problem. def lifecycleVersion = "2.5.1" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion" implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") // custom pop_up implementation("com.github.skydoves:balloon:1.6.0") { exclude group: "androidx.lifecycle" } Please let me know the solution. thank you
Hi @nguyenhung111, would you able to update your lifecycle library version to 2.6.2?
Yes. I updated to 2.6.2 and ballon to 1.6.1. but it seems like the error still exists. Do I need to update hilt or dagger // dagger hilt implementation("com.google.dagger:hilt-android:2.44.2") kapt("com.google.dagger:hilt-android-compiler:2.44.2") kapt("androidx.hilt:hilt-navigation-fragment:1.0.0") kapt("androidx.hilt:hilt-compiler:1.0.0") //lifecycle viewmodel def lifecycleVersion = "2.6.2" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion" implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") // custom pop_up implementation("com.github.skydoves:balloon:1.6.1") { exclude group: "androidx.lifecycle" }
Please complete the following information:
Describe the Bug:
the Builder is just fine, but every single balloon.xxx gives the same error:
This is my build gradle: ext.lifecycle_version = '2.5.1'
I'm running Kotlin 1.8.0 on Android Studio Flamingo 2022.2.1
The thing is, it does still compile, and it sort of works, but my controller is full of errors