Version
6.19.1
Platforms
Android
System Version
- Host: macOS 26.2
- Android SDK: compileSdkVersion 36, targetSdkVersion 36
Device
Build-time issue (no physical device required)
Architecture
New architecture enabled (newArchEnabled=true, using interop layer)
Description
Running Android lint on the react-native-video module fails with a WrongThread error.
Lint reports that getVideoTrackInfoFromManifest must be called from a worker thread, but it is currently inferred to be running on the UI thread.
This causes the lint task to fail and blocks builds where lint is enforced.
Steps to Reproduce
-
Create a new React Native project:
npx @react-native-community/cli@latest init MyApp
-
Install the dependency:
npm install react-native-video@6.19.1
-
Run lint on the library module:
cd android
./gradlew :react-native-video:lintDebug
also fails, because it includes lint tasks.
-
Observe the failure.
Actual Result
Lint fails with the following error:
Execution failed for task ':react-native-video:lintDebug'.
> Lint found errors in the project; aborting build.
.../node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java:1616:
Error: Method getVideoTrackInfoFromManifest must be called from the worker thread, currently inferred thread is UI thread [WrongThread]
return this.getVideoTrackInfoFromManifest(0);
Expected Result
Android lint should pass without errors, or the method should be annotated or handled in a way that satisfies lint thread expectations.
Environment
- react-native: 0.85.0
- react: 19.2.3
- react-native-video: 6.19.1
- Gradle: 9.3.1
- Java: 17.0.16
- newArchEnabled: true
- hermesEnabled: true
Additional Notes
- This issue occurs during lint execution and blocks CI/build pipelines that enforce lint checks.
- Likely related to missing or incorrect thread annotations in
ReactExoplayerView.
Version
6.19.1
Platforms
Android
System Version
Device
Build-time issue (no physical device required)
Architecture
New architecture enabled (
newArchEnabled=true, using interop layer)Description
Running Android lint on the
react-native-videomodule fails with aWrongThreaderror.Lint reports that
getVideoTrackInfoFromManifestmust be called from a worker thread, but it is currently inferred to be running on the UI thread.This causes the lint task to fail and blocks builds where lint is enforced.
Steps to Reproduce
Create a new React Native project:
Install the dependency:
Run lint on the library module:
cd android ./gradlew :react-native-video:lintDebugalso fails, because it includes lint tasks.
Observe the failure.
Actual Result
Lint fails with the following error:
Expected Result
Android lint should pass without errors, or the method should be annotated or handled in a way that satisfies lint thread expectations.
Environment
Additional Notes
ReactExoplayerView.