VLC compile for Android

一、開發環境

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使用的庫


4. 需要Android SDK21版本,否則需要修改裏面的代碼。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章