react-native-video: Android Exoplayer - Failed

Android ExoPlayer - Build Execution Fails

I am trying to run Android Build with ExoPlayer and I am getting the following 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
/Users/mohibwasay/Desktop/workspace/relevnt/relevnt-app/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java:330: error: cannot find symbol
        ImageButton playButton = playerControlView.findViewById(R.id.exo_play);
                                                                    ^
  symbol:   variable exo_play
  location: class id
/Users/mohibwasay/Desktop/workspace/relevnt/relevnt-app/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java:342: error: cannot find symbol
        ImageButton pauseButton = playerControlView.findViewById(R.id.exo_pause);
                                                                     ^

build.gradle

plugins {
    id "com.android.application" version '7.1.2' apply false
    id "com.android.library" version '7.1.2' apply false
    id "org.jetbrains.kotlin.android" version "1.6.10" apply false
    id "com.google.gms.google-services" version "4.3.10" apply false
    id "com.osacky.doctor" version "0.8.0"
}

ext {
    buildToolsVersion = "33.0.0-rc2"
    minSdkVersion = 21
    compileSdkVersion = 31
    targetSdkVersion = 30
    supportLibVersion = "28.0.0"
    firebaseBomVersion = "28.2.0"
    googlePlayServicesVersion = "18.+"
    ndkVersion = "21.4.7075529"
    googlePlayServicesAuthVersion = "19.2.0" 
    kotlin_version = "1.6.10"
}


task clean(type: Delete) {
    delete rootProject.buildDir
}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

We are also facing the same issue when we update the React native version to 0.73 Is there any fix available on top of 5.2.1 ?

I change this line myself to:

ImageButton playButton = playerControlView.findViewById(com.google.android.exoplayer2.R.id.exo_play); ImageButton pauseButton = playerControlView.findViewById(com.google.android.exoplayer2.R.id.exo_pause);

I am getting this same issue, anyone fixed it yet…

React Native - 0.73 React Native Video - 5.2.1

I can’t seem to find any solution. Please help

@CZDevops Where did you modify these lines?I am having the same issues and could not figure out where you applied the changes

Thank you very much

node_modules\react-native-video\android-exoplayer\src\main\java\com\brentvatne\exoplayer\ReactExoplayerView.java

We are also facing the same issue when we update the React native version to 0.73 Is there any fix available on top of 5.2.1 ?