Library via Gradle dependency not visible/useable?

Hey Gradle people.

I’m loading an Android-based library like so (main build.gradle file):

project(":android-pro") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"

The line in question:

compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'

I notice when I refresh Gradle (through Eclipse) I see the library and its files being downloaded and cached. I even clean, refresh, and restart Eclipse but not matter what I do, the classes/methods/packages of the library do not show up as usable (as in, Eclipse doesn’t suggest them in auto complete and doesn’t even know they exist).

Gradle Dependencies are also listed under my project’s build path so they should all be included.

Just wondering if I’m doing something wrong here, I believe I followed the instructions outlined on the library’s instructions page.

Any help appreciated!

This is because that particular dependency is an Android library (.aar file) so Eclipse has no idea what to do with it. Is there a reason you aren’t using Android Studio for this project?

Ah, that makes sense. I would assume that means I’m out of luck with this particular library then.

Well, it’s a multi-platform project build with LibGDX - desktop, Android, and iOS via RoboVM, so I’ve used Eclipse from the very beginning.

I assume I can probably somehow work on just the Android side of things via Android Studio somehow, but as I’ve never worked with it before I think it’d be more time-efficient to see if I can’t find an alternative library first.

Appreciate the answer though, thanks!

The other option would be to repackage it as a JAR, or extract the classes and manually set up the eclipse classpath to point at the extracted classes directory. That would just ensure the you could compile within eclipse. In the end Gradle is going to build your project and with the ‘android’ plugin it knows how to understand AAR dependencies.