callstack / callstack/react-native-pager-view

ViewPager2 does not support direct child views , Cannot read property 'getViewManagerConfig' of null

Open
#1,022 1 comment 0 reactions 0 assignees View on GitHub
Resolution: Needs Repro
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

# Environment

react: 18.3.1
react-native: 0.76.9
react-native-pager-view: ^6.9.1
react-native-video: 5.2.1

# Description

When using react-native-video inside react-native-pager-view, I encounter the error:

ViewPager2 does not support direct child views

As a result, the video does not play correctly. Since I am implementing tab navigation, using react-native-pager-view is required.

I downgraded react-native-video to version 5.2.1 for stability, but the issue persists. When testing with the latest version of react-native-video, the video component still does not behave as expected.

I have already updated my android/app/build.gradle file with the following dependencies:

implementation "androidx.viewpager2:viewpager2:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.3.2"

However, the error remains.

It seems that the issue might be related to the package itself. Could you please provide guidance or a fix?

# Reproducible Demo

Install the same dependencies and run the app. You should be able to reproduce the error consistently.

# Screenshot

Error Screenshot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.