Skip to content

[Bug]: 🐞 Kotlin Compilation Error: Argument type mismatch in LiveStreamViewManagerSpec.kt (React Native 0.78.1, Java 17) #105

@VamshiAlugoju

Description

@VamshiAlugoju

Version

v2.0.2

Which operating systems have you used?

  • Android
  • iOS

Environment that reproduces the issue

While integrating @api.video/react-native-livestream in a React Native project (react-native@0.78.1), the Android build fails due to a Kotlin compilation error.

💥 Full Error Log:
bash
Copy
Edit

Task :api.video_react-native-livestream:compileDebugKotlin FAILED
e: file:///Users/mac/Desktop/chatbucket/cb_mobile/node_modules/@api.video/react-native-livestream/android/src/oldarch/LiveStreamViewManagerSpec.kt:26:41
Argument type mismatch: actual type is 'kotlin.String?', but 'kotlin.String' was expected.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':api.video_react-native-livestream:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 48s

error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
💻 Environment:
Java: 17

React Native: 0.78.1

Library: @api.video/react-native-livestream@2.0.2

📍 Root Cause:
Kotlin type mismatch due to nullability — a nullable String? is passed where a non-nullable String is expected in LiveStreamViewManagerSpec.kt.

Is it reproducible in the example application?

Yes

RTMP Server

api.video

Reproduction steps

🧪 Steps to Reproduce:
Install the library

Run npx react-native run-android

Observe the build failure

Expected result

✅ Expected:
Code should safely handle nullable strings and compile successfully with Java 17 and React Native 0.78.1.

Please address this compatibility issue. Let me know if more details are required.

Actual result

Build is faling when we run npm run android.

Additional context

No response

Relevant logs output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions