0

i try include aacdecoder (https://github.com/vbartacek/aacdecoder-android) to my project. In decoder readme says my dependency is

<dependency>
        <groupId>com.spoledge.aacdecoder</groupId>
        <artifactId>aacdecoder-lib</artifactId>
        <version>0.8</version>
        <type>apklib</type>
</dependency>

but when i use in my build.gradle like this

compile 'com.spoledge.aacdecoder:aacdecoder-lib:0.8'

it fail when i am try sync it.


After jitpack.io (thanks OleGG), like in image (downside) it isnt apper like exoplayer.

enter image description here

eren
  • 31
  • 6

1 Answers1

1

As you can see from maven library definition, it's distributed as <type>apklib</type>, and apklib is unsupported by Gradle.

The easiest solution will be to package this library within your repo. Also you can follow the instructions from this question How to convert apklib to aar, but anyway it'll lead to app repackage.

Also you can try to use https://jitpack.io to package it automatically. In this case you need to add jitpack repo to your root build.gradle file like this:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

and then provide github repo as a dependency in appropriate modules:

dependencies {
    compile 'com.github.vbartacek:aacdecoder-android:0.8'
}
Community
  • 1
  • 1
OleGG
  • 8,589
  • 1
  • 28
  • 34
  • thanks it is work but how can i import in my class because this is work import com.spoledge.aacdecoder.AACPlayer; but i cant use import com.github or com.spoledge. They dont come after com. – eren Feb 13 '16 at 12:21
  • Possibly, jitpack was unable to convert github repo to archive. So, we are back to situation when you need to make library manually – OleGG Feb 13 '16 at 16:02