Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Google ExoPlayer to Android studio gradle build

If i have an Android app developed using Android Studio is it possible to link the ExoPlayer library (https://github.com/google/ExoPlayer) straight from github using graddle?

It would be handy not to manually have to download the library and copy it into my project every time it's updated by the ExoPlayer team.

I have tried adding this to the build.gradle in my module.

repositories {
    mavenCentral()
    maven { url 'https://raw.github.com/google/ExoPlayer' }
}
dependencies {
    compile 'com.google.android.exoplayer'
}

But i get an error about the module notation being invalid...

like image 223
Juan Carlos Ospina Gonzalez Avatar asked Jul 10 '15 14:07

Juan Carlos Ospina Gonzalez


1 Answers

It is now possible to add ExoPlayer as a jCenter dependency via gradle!

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    ...
    compile 'com.google.android.exoplayer:exoplayer:r1.4.1'
}
like image 153
Juan Carlos Ospina Gonzalez Avatar answered Oct 03 '22 00:10

Juan Carlos Ospina Gonzalez