
本人编译的是VLC-Android的当前最新版本2.1.18。 官方源码的Git地址:https://code.videolan.org/videolan/vlc-android.git 官方编译的文档地址:https://wiki.videolan.org/AndroidCompile/
本人用的Ubuntu16.04LTS 64位版本进行编译的。

如果你是64位操作系统,那么就多下载这几个文件,32位的无需下载。 打开终端,输入命令即可下载:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install zlib1g:i386 libstdc++6:i386 libc6:i386
接下来进入准备和编译工作步骤:
1.下载Linux下的JDK,SDK,NDK,Android-Studio(推荐下载,可不下载)。 我这里的JDK版本是jdk1.8.0_101,NDK是android-ndk-r14b。SDK里最好下载个最新的android SDK。


附上NDK下载地址:https://developer.android.google.cn/ndk/downloads/index.html,其他下载地址可以去官方网站下载。
2.环境变量配置。 输入命令:
sudo gedit /etc/profile

export NDK=/home/tandong/android-ndk-r14b
export ANDROID_NDK=/home/tandong/android-ndk-r14b
export PATH=${ANDROID_NDK}:$PATH
export ANDROID_SDK=/home/tandong/android-sdk-linux
export PATH=$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$PATH
export JAVA_HOME=/home/tandong/jdk1.8.0_101
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:${JAVA_HOME}/lib/tools.jar
export PATH=${JAVA_HOME}/bin:$PATH
export ANDROID_ABI=armeabi-v7a
我只指定了一种架构so库,你也可以指定多种。如armeabi,x86,mips等。 编辑完之后,输入命令:
source /etc/profile即可。
3.接下来下载VLC Android源码。
git clone https://code.videolan.org/videolan/vlc-android.git
如果提示你没安装git的话,按照提示安装git即可。
4.下载完毕源码后,命令进入vlc-android源码根目录,输入命令:
sh compile.sh -a <ABI><ABI>为你要编译的架构so库,也可以不指定,按照之前配置的进行编译。




5.这样就编译完毕了,APK也会编译完毕。展示下项目结构截图。




好了,那么当前最新版的VLC Android编译完毕。如果网速不好,需要*,下载ubuntu下的**即可。
参考文献:
1.AndroidCompile https://wiki.videolan.org/AndroidCompile/
版权所有,尊重版权。 微信公众号:
