Unable to build app after instaling react-native-video

See original GitHub issue

Current behavior

`> Task :react-native-video:compileDebugJavaWithJavac FAILED F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ExoPlayerView.java:25: error: cannot find symbol import com.google.android.exoplayer2.ui.SubtitleView; ^ symbol: class SubtitleView location: package com.google.android.exoplayer2.ui F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ExoPlayerView.java:34: error: cannot find symbol private final SubtitleView subtitleLayout; ^ symbol: class SubtitleView location: class ExoPlayerView F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ReactExoplayerView.java:67: error: cannot find symbol import com.google.android.exoplayer2.ui.PlayerControlView; ^ symbol: class PlayerControlView location: package com.google.android.exoplayer2.ui F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ReactExoplayerView.java💯 error: cannot find symbol private PlayerControlView playerControlView; ^ symbol: class PlayerControlView location: class ReactExoplayerView F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ExoPlayerView.java:74: error: cannot find symbol subtitleLayout = new SubtitleView(context); ^ symbol: class SubtitleView location: class ExoPlayerView F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ReactExoplayerView.java:283: error: cannot find symbol playerControlView = new PlayerControlView(getContext()); ^ symbol: class PlayerControlView location: class ReactExoplayerView F:\newapp\classcast\node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ReactExoplayerView.java:1160: error: cannot find symbol } else if (getChildAt(1) instanceof PlayerControlView && exoPlayerView != null) { ^ symbol: class PlayerControlView location: class ReactExoplayerView Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 7 errors

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:react-native-video:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.`

Reproduction steps

Installed react-native-video and linked it as per guidlines. These are my dependencies "dependencies": { "react": "16.6.3", "react-native": "0.58.5", "react-native-elements": "^1.0.0", "react-native-firebase": "^5.2.2", "react-native-gesture-handler": "^1.0.15", "react-native-linear-gradient": "^2.5.3", "react-native-modal": "^7.0.2", "react-native-snap-carousel": "^3.7.5", "react-native-svg": "^9.2.4", "react-native-svg-charts": "^5.2.0", "react-native-vector-icons": "^6.2.0", "react-native-video": "^4.4.0", "react-navigation": "^3.2.1" },

Expected behavior

A normal build

Platform

Which player are you experiencing the problem on:

  • iOS
  • Android ExoPlayer
  • Android MediaPlayer
  • Windows UWP
  • Windows WPF

Video sample

If possible, include a link to the video that has the problem that can be streamed or downloaded from.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cobarxcommented, Mar 13, 2019

Try unlinking and re-linking with react-native unlink react-native-video and react-native link react-native-video. This sort of thing happens all the time for me and it’s sort of magic to get it working again. Sometimes restarting Android Studio will fix it as well.

0reactions
CHaNGeTecommented, Jul 25, 2019

Have you manually updated exoplayer? Make sure you are using 2.9.3

The errors you are getting should be deprecation warnings on 2.9.3.

Seems you are trying to use a higher version, maybe you have another library setting it to another version?

In any event, if you don’t see any other version being used, try this PR please: https://github.com/react-native-community/react-native-video/pull/1653

Read more comments on GitHub >

github_iconTop Results From Across the Web

BUILD FAILED after installing react-native-video · Issue #2616
hello im getting a bug when trying to install the package, im wondering what im doing wrong? Working with react-native-cli, only installed ...
Read more >
Can't run the project after installing react-native-video
Go to file: node_module/react-native-video/android-exoplayer/build.gradle. change all references of 2.13.2 to 2.13.3.
Read more >
react-native-video - npm
Start using react-native-video in your project by running `npm i react-native-video`. ... Usage; iOS App Transport Security; Audio Mixing ...
Read more >
5 common errors found in a React Native app (using Expo)
When creating a mobile app with React Native, you can use Expo to streamline some complexities. Meet the most common errors and how...
Read more >
Can't build react native app after… | Apple Developer Forums
My RN application started to crash after installing macos monterrey and upgrading to xcode 13. I can't find anything clear on the internet....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found