Skip to content

Commit

Permalink
fix: Fix React Native 77 Android build failure by LifecycleOwner (#…
Browse files Browse the repository at this point in the history
…3394)

Fixes #3380
  • Loading branch information
High5Apps authored Feb 14, 2025
1 parent b687014 commit 6501b63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ dependencies {
implementation "androidx.camera:camera-view:${camerax_version}"
implementation "androidx.camera:camera-extensions:${camerax_version}"

// Lifecycle dependency
implementation "androidx.lifecycle:lifecycle-common:2.8.7"

// Some Coroutines extension functions
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class CameraSession(internal val context: Context, internal val callback: Callba
}
}

override fun getLifecycle(): Lifecycle = lifecycleRegistry
override val lifecycle: Lifecycle
get() = lifecycleRegistry

/**
* Configures the [CameraSession] with new values in one batch.
Expand Down

0 comments on commit 6501b63

Please # to comment.