An unofficial library of LibVLC for Android. The goal of this project is to be able to use LibVLC as an Android dependency.
An unofficial library of LibVLC for Android. The goal of this project is to be able to use LibVLC as an Android dependency.
Add this in your root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and add the following in the dependent module:
dependencies {
implementation 'com.github.masterwok:libvlc-android-sdk:3.0.13'
}
unless you're a fan of large APKs, you'll probably want to add the following to the build.gradle of your app so an APK is generated per ABI:
android {
...
splits {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk false
}
}
}
// Map for the version code that gives each ABI a value.
ext.abiCodes = [
'armeabi-v7a': 1,
'arm64-v8a' : 2,
'x86' : 3,
'x86_64' : 4
]
import com.android.build.OutputFile
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = baseAbiVersionCode * 10000000 + variant.versionCode
}
}
}
This is the tricky bit. If you want to build this project on your own, I would recommend doing it within a Ubuntu VM. I ran into quite a few build problems and found it helpful to fallback to snapshots when initially attempting to build LibVLC. Follow the official compile wiki here to setup your development environment (no need to clone repo or that jazz yet, see below). Once completed, follow these steps: