一、下载VLC源码:
git clone https://code.videolan.org/videolan/vlc-android.git
编译apk: sh compile.sh -a armeabi-v7a生成路径:vlc-android/build/outputs/apk/vanillaARMv7/debug
编译aar: sh compile.sh -l -a armeabi-v7a -r生成路径:libvlc/build/outputs/aar
编译so: sh compile-libvlc.sh -a armeabi-v7a生成路径:libvlc/private_libs/libs/armeabi-v7a
二、配置sdk和ndk:
https://developer.android.com/studio/index.html //下载配置 Android studio ,获取sdk
https://developer.android.com/ndk/downloads/older_releases.html#ndk-14-downloads //下载ndk
sudo tar zxvf ./protobuf-cpp-3.1.0.tar.gz #解压
cd ./protobuf-3.1.0/ #解压出的文件夹
./configure #运行configure
make
make check
sudo make install
make clean
sudo ldconfig #更新shared library cache
具体参考如下资料:
Android Studio, SDK and NDK installation
Requirements
YouMUSTbuild on Linux (or OSX if you know what you are doing).
The following packagesMUSTmust be installed:
the GNU autotools:autoconf,libtool,automakeandmake(a.k.a.gmake)
...and their dependencies:m4andgawk,mawkornawk,
the GNU C and C++ compilers a.k.a.gccandg++,
some GNU build utilities:pkg-configandpatch,
the following other build utilities:Apache Ant(orAnt),cmake,protobuf,ragel,
the Subversion and Git version control systems
unzipand eithercurlorwgetfor retreiving sources.
Very recent versions of some of those tools may be required. At the time of writing, notably gettext 0.19.3 or later is required.
If any of the above is missing, expect the build to fail at some point.
If targeting an Android-x86 device,yasmmust be installed too.
Precise lists of tools dependencies is listed
64-bit users: You must install these 32-bit libs as specified here:
Example on Ubuntu
Install the packages as follow:
sudo apt-get install automake ant autopoint cmake build-essential libtool \
patch pkg-config protobuf-compiler ragel subversion unzip git \
openjdk-8-jre openjdk-8-jdk flex
SDK & Android Studio
Android Studio is recommended, but not mandatory!
Download the command-line tools
mkdir android-sdk
cd android-sdk; unzip tools_r25.2.3-linux.zip
./tools/bin/sdkmanager --update
Android NDK
Check that the SDK installation is correct.
Go to theAndroid NDK pageand download theNDK r14bfor Linux.
Decompress it to install
Environment setup
Set$ANDROID_SDKto point to your Android SDK directory
export ANDROID_SDK=/path/to/android-sdk
Set$ANDROID_NDKto point to your Android NDK directory