0

I'm using this module in a React-native project but I'm getting error while I run npx react-native run-android

Error:

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
e: file:///Users/uguraaktas/Documents/Projects/test/node_modules/amazon-ivs-react-native-player/android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt:296:5 'when' expression must be exhaustive, add necessary 'BUFFERING', 'IDLE', 'ENDED' branches or 'else' branch instead

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':amazon-ivs-react-native-player:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

I checked the module's repository but I couldn't find a solution because it is new yet.

Ugur
  • 750
  • 9
  • 20
  • The error message `'when' expression must be exhaustive, add necessary 'BUFFERING', 'IDLE', 'ENDED' branches or 'else' branch instead` seems like it's giving us a hint. Can you share your code? – Todd Sharp Apr 13 '23 at 15:11

1 Answers1

0

This is a known issue with the android-ivs-react-native-player library. There is a workaround available. A fix is pending and will be included in the next release.

Todd Sharp
  • 3,207
  • 2
  • 19
  • 27