2

I have a problem to build a expo detached project in android. When i build the project, the output from console build says: Failed to resolve: com.google.android.exoplayer:exoplayer-smoothstreaming:2.6.1

Steps to reproduce

  1. Init a project from: expo init
  2. Detach project with: exp detach
  3. Open /android in Android Studio

Solution attempts

Put the dependency manually in app/build.gradle

dependencies { implementation com.google.android.exoplayer:exoplayer-smoothstreaming:2.6.1 }

Install Repository and sync project from Android Studio, results in: SDK Manager Could not find dependency "com.google.android.exoplayer:exoplayer-smoothstreaming:2.6.1"

Invalidate caches and restart project from Android Studio - File/Invalidade Caches / Restart option

Helper links

Expo.io: https://docs.expo.io/versions/v31.0.0/

Detaching to ExpoKit: https://docs.expo.io/versions/v28.0.0/expokit/detach#__next

MVN Repository ExoPlayer Smoothstreaming: https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer-smoothstreaming/2.9.2

thanks in advance.

1 Answers1

0

I added

maven { url 'https://google.bintray.com/exoplayer/' }
maven { url 'https://dl.bintray.com/android/android-tools' }
maven { url 'https://dl.bintray.com/firebase/gradle/' }

to my root build.gradle to get rid of the error.

Note that it has to go in your allProjects block

This is what I have as an example:

allprojects {
    repositories {
        maven { url 'https://google.bintray.com/exoplayer/' }
        maven { url 'https://dl.bintray.com/android/android-tools' }
        maven { url 'https://dl.bintray.com/firebase/gradle/' }
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        flatDir {
            dirs 'libs'
        }
    }
c_idle
  • 1,448
  • 4
  • 22
  • 40