plaidshirt
plaidshirt

Reputation: 5681

gdx-video - Error: Failed to resolve: com.badlogicgames.gdxvideo:gdx-video:0.0.1

I would like to use gdx-video extension in my libGDX project, to embed a YouTube video. I have found this extension on GitHub, but there are several error messages during Gradle Sync process. I have pasted dependencies in build.gradle file.

Error:Failed to resolve: com.badlogicgames.gdxvideo:gdx-video:0.0.1 Error:Failed to resolve: com.badlogicgames.gdxvideo:gdx-video-platform:0.0.1 Error:Failed to resolve: com.badlogicgames.gdxvideo:gdx-video-android:0.0.1

Upvotes: 1

Views: 1247

Answers (2)

Everett Wenzel
Everett Wenzel

Reputation: 61

I was able to fix this inside of AndroidStudio by editing the build.gradle for the project and adding these dependencies to allprojects and buildscript. Make sure to use the updated names mentioned above.

compile "es.e-ucm.com.badlogicgames.gdx:gdx-video-android:0.0.1-SNAPSHOT"

compile "es.e-ucm.com.badlogicgames.gdx:gdx-video:0.0.1-SNAPSHOT"

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }
}

Upvotes: 3

Enigo
Enigo

Reputation: 3895

I reproduced your problem and here is a solution:

1) Make sure that oss.sonatype.org repositories are synchronized correctly. You can check it in File | Settings | Build, Execution, Deployment | Build Tools | Maven | Repositories (I use Idea 15.0.3). If it's not - press Update button.On my machine it took about 40 minutes to sync releases and about 10 for snapshots.
2) Then in your root build.gradle:

        project(":core") {
           dependencies {
                    ...........
              compile "es.e-ucm.com.badlogicgames.gdx:gdx-video:0.0.1-SNAPSHOT"
          }
      }

        project(":android") {
            dependencies {
                compile project(":core")
                ..............
                compile "es.e-ucm.com.badlogicgames.gdx:gdx-video-android:0.0.1-SNAPSHOT"
            }
        }

        project(":desktop") {
            dependencies {
                .................
                compile "es.e-ucm.com.badlogicgames.gdx:gdx-video-desktop:0.0.1-SNAPSHOT"
            }
        }

Then resync project. I didn't use that project, so, if you miss some dependencies go to sonatype.org and search for gdx-video (I saw gdx-video-parent and gdx-video-gwt project there also, not sure what they are responsible for)

Upvotes: 3

Related Questions