Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android ExoPlayer Integration #697

Closed
iamronsuez opened this issue Jul 13, 2017 · 8 comments
Closed

Android ExoPlayer Integration #697

iamronsuez opened this issue Jul 13, 2017 · 8 comments

Comments

@iamronsuez
Copy link

Hi, i'm trying to integrate the android-exoplayer project and it throws me an error due duplicate modules for android support, is there a particular configuration at the build.gradle that i'm missing ?

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/graphics/BitmapCompat.class

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more >log output.

This was referenced Jul 13, 2017
@AndrewJack
Copy link
Contributor

AndrewJack commented Jul 13, 2017

Could you share an example project that reproduces this issue?

What version of react native are you using too?

@iamronsuez
Copy link
Author

Hello, thanks for your response, here is the example repo.

react-native-cli: 2.0.1 react-native: 0.46.2

@iamronsuez
Copy link
Author

iamronsuez commented Jul 13, 2017

i was having issues with dex so i added multiDexEnabled true at the android default conf, when I try to make the debug apk it throws me the error mentioned above.

@AndrewJack
Copy link
Contributor

I've found the issue and fixed it here iamronsuez/rn-video#1

@AndrewJack
Copy link
Contributor

AndrewJack commented Jul 13, 2017

ExoPlayer uses a newer version of the support library than react native.

Forcing react native to use a newer version fixes it.

I'm using v25.3.1, it works with react native because there isn't currently any breaking api changes.

@iamronsuez
Copy link
Author

many thanks!

@eyalcohen4
Copy link

eyalcohen4 commented May 28, 2018

still happening here in 2.0.0

  • react-native init
  • npm install react-native-video
  • react-native link react-native-video
  • switch react-native-video package to react-native-video-exoplayer package in settings.gradle and build.gradle

    dependencies {
         compile project(':react-native-video-exoplayer')
         compile fileTree(dir: "libs", include: ["*.jar"])
         compile "com.android.support:appcompat-v7:23.0.1"
        compile "com.facebook.react:react-native:+"  // From node_modules
    }
    include ':react-native-video-exoplayer'
    project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, 
    '../node_modules/react-native-video/android-exoplayer')

@vbspace
Copy link

vbspace commented Jul 21, 2019

Its crashing the app

ZhenhuiDev added a commit to snsdigitaldevs/react-native-video that referenced this issue Feb 16, 2022
ZhenhuiDev added a commit to snsdigitaldevs/react-native-video that referenced this issue Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants