You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Address Kotlin compilation errors for requestPermissionLauncher
This commit applies further corrections to resolve Kotlin compilation
errors related to `requestPermissionLauncher` in `MainActivity.kt`.
Previous changes addressed a "recursive type checking" error by adding
explicit type annotations. This commit addresses a subsequent
"Variable 'requestPermissionLauncher' must be initialized" error.
The following changes were made:
1. `requestPermissionLauncher` declaration was changed from a `val`
initialized at the declaration site to a `private lateinit var`.
2. The initialization of `requestPermissionLauncher` (using
`registerForActivityResult`) was moved into the `onCreate` method,
ensuring it's initialized before any potential use.
These modifications are standard practices for handling ActivityResultLaunchers
and aim to resolve the reported initialization and type inference issues.
0 commit comments