一、开发环境
Ubuntu14.04 + NDK r10d + Eclipse
1. 要求:你必须使用Linux或OSX系统,必须安装这些软件包:apache-ant(or ant), autoconf, automake, autopoint, cmake, gawk(or nawk), gcc, g++,
libtool, m4, patch, pkg-config, protobuf, ragel, subversion, unzip。
2. 环境变量设置
Set $ANDROID_SDK to point to your Android SDK directory
export ANDROID_SDK=/path/to/android-sdk
Set $ANDROID_NDK to point to your Android NDK directory
export ANDROID_NDK=/path/to/android-ndk
Add some useful binaries to your $PATH
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
Devices
You need to export the ABI for your device. armeabi-v7a
is for devices with ARMv7 or above (regardless of NEON), any other ARM device uses armeabi
, x86/Intel devices use x86
.
export ANDROID_ABI=armeabi-v7a
or
export ANDROID_ABI=armeabi
For a build that will run on x86 Android devices (e.g. certain Intel Android smartphones):
export ANDROID_ABI=x86
For a build that will run on MIPS devices (i.e. Ainol Novo tablets):
export ANDROID_ABI=mips
The following flags (NEON, FPU, ARMV6) are relevant only for the armeabi ABI:
If you plan to use an armeabi device that does not support FPU, you need a build without FPU
export NO_FPU=1
If you plan to use an ARMv5 armeabi device (read: Android Emulator), you need a build without ARMv6
export NO_ARMV6=1
二、编译
1. 获取VLC源码
git clone git://git.videolan.org/vlc-ports/android.git
2. 编译
sh compile.sh
三、Eclipse中导入VLC工程
1. 导入VLC工程
2. 导入appcompat和WheelView
3. 指定VLC使用的库