VLC FOR ANDROID源码编译(ubuntu) - 21IC中国电子网

android ubuntu

VLC FOR ANDROID源码编译(ubuntu)

2019-10-09
224次浏览

一定要读到最后哦

参考链接:

http://blog.csdn.net/shulianghan/article/details/42707293

https://wiki.videolan.org/AndroidCompile/#Android_Studio.2C_SDK_and_NDK_installation

平台(很重要):

ubuntu 16.04 64位:http://releases.ubuntu.com/16.04/ubuntu-16.04-desktop-amd64.iso

过程:

1.安装开发包(更新软件源,安装vmware tools就不说了)

sudo apt-get install automake ant autopoint cmake build-essential libtool \
     patch pkg-config protobuf-compiler ragel subversion unzip git

2.下载android studio
平台 Android Studio 软件包 大小 SHA-1 校验和 Windows android-studio-bundle-145.3537739-windows.exe
包含 Android SDK (推荐) 1674 MB
(1756130200 bytes) 272105b119adbcababa114abeee4c78f3001bcf7 android-studio-ide-145.3537739-windows.exe
无 Android SDK 417 MB
(437514160 bytes) b52c0b25c85c252fe55056d40d5b1a40a1ccd03c android-studio-ide-145.3537739-windows.zip
无 Android SDK,无安装程序 438 MB
(460290402 bytes) 8c9fe06aac4be3ead5e500f27ac53543edc055e1 Mac OS X android-studio-ide-145.3537739-mac.dmg 434 MB
(455263302 bytes) 51f282234c3a78b4afc084d8ef43660129332c37 Linux android-studio-ide-145.3537739-linux.zip 438 MB
(459957542 bytes) 172c9b01669f2fe46edcc16e466917fac04c9a7f 3.安装protobuf

下载链接https://github.com/google/protobuf/releases

./autogen.sh
./configure
make
sudo make install
sudo gedit ~/.bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
source ~/.bashrc

无论什么工具都下载最新的(后面不再重复)

4.安装jdk

http://www.oracle.com/technetwork/java/javase/downloads/index.html

export JAVA_HOME=/home/callon/jdk1.8.0_111  
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export PATH=${JAVA_HOME}/bin:$PATH

update-alternatives --display java

5.打开studio

按照提示下载最新的sdk,在sdk manager中下载ndk(记住路径哦,一般是xxx/Android/Sdk和xxx/Android/Sdk/ndk-bundle)

6.最终配置

export ANDROID_SDK=/home/callon/Android/Sdk  
export ANDROID_NDK=/home/callon/Android/Sdk/ndk-bundle
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools  
export ANDROID_ABI=armeabi-v7a  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

7.获取源码

git clone https://code.videolan.org/videolan/vlc-android.git
8.编译

sh compile.sh
Note: 如果出了如下错误

autoreconf: configure.ac: tracing
configure.in:74: error: possibly undefined macro: AC_DISABLE_SHARED
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:75: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.in:76: error: possibly undefined macro: AC_PROG_LIBTOOL
一定是因为没有使用最新的ubuntu和工具链
9.











希望读者看到最后了,如下是我最后编译的源码(2017.4.2),欢迎下载,记得读README哦!

https://pan.baidu.com/s/1i5E8vat

提取码:59b2



我要点评

评论暂时关闭。