VLC多媒体播放器(英语:VLC media player,最初为VideoLAN Client。是VideoLAN计划的开放源码多媒体播放器。)支持众多音频与视频解码器及文件格式,并支持DVD影音光盘,VCD影音光盘及各类流协议,它是一个开源而且支持多种平台。另一款 Android 与 iOS 平台上的全能多媒体开发框架Vitamio,这里仅仅讲VCL

官网:https://wiki.videolan.org/AndroidCompile#Get_VLC_Source

环境:

宿主机:Windows XP

虚拟机:VirtualBox-4.3.12-93733-Win.exe

虚拟机系统:ubuntu14.04

环境搭建要求:

在Linux系统上,我安装的是Ubuntu14.04

须要安装的工具:

apache-ant (or ant), autoconf, automake, autopoint, cmake, gawk (or nawk), gcc, g++, libtool, git,

m4, patch, pkg-config, ragel, subversion, unzip.

提示:

1、假设是编译Android-x86设备。应该安装yasm

一、Android SDK

1.创建一个名为android_tools的文件夹

2.到官网上下载最新的SDK http://developer.android.com/sdk/index.html

3.解压到android文件夹下

4.执行:tools/android (也能够执行: "tools/android update sdk -u -t platform,platform-tool,extra")

5.在tool文件夹,安装"SDK Platform Android 4.3, API 18",依据提示操作

注:VLC的工程属性文件project.properties的target=android-18一定是已经安装的,否则会报问题三:



二、Android NDK

1.确保SDK已经成功安装,NDK要r9 版本号以上的,由于在compile.sh文件里已经配置好了,假设版本号过低会提示:You need the NDKv9 or later

2.下载NDK for Linux http://developer.android.com/intl/zh-cn/tools/sdk/ndk/index.html

3.解压到android_tools文件夹下,确保和SDK放在同一文件夹下



注意安装SDK和NDK时一定要注意机器是64还是32位。下载相应的版本号安装,否则会有一些莫名其妙的问题

SDK和NDK的安装,都是解压的当前文件夹android_tools下

dzt@dzt-VirtualBox:~/android_tools$ sudo tar -xvf /mnt/shared/android-ndk-r9d-linux-x86.tar.bz2

dzt@dzt-VirtualBox:~/android_tools$ sudo unzip /mnt/shared/adt-bundle-linux-x86-20140702.zip



三、配置环境变量

Environment setup

在~/.bashrc最后加入 sudo gedit ~/.bashrc

export ANDROID_SDK=/home/dzt/android_tools/adt-bundle-linux-x86_64-20140321/sdk

export ANDROID_NDK=/home/dzt/android_tools/android-ndk-r9d

export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools

依据实际安装路径写



环境变量设置等效:

dzt@dzt-VirtualBox:~/android_tools$ sudo source ~/.bashrc



Devices在命令行中指定设备,这个不是在文件里配置的,每次编译后退出再进来都须要又一次设置

root@dzt-VirtualBox:/home/dzt/android_vlc/android# export ANDROID_ABI=armeabi

root@dzt-VirtualBox:/home/dzt/android_vlc/android# export NO_FPU=1

四、编译

1.Get VLC Source

在之前创建的android文件夹下执行下面命令

git clone git://git.videolan.org/vlc-ports/android.git

2.Compile

执行:sh compile.sh

root@dzt-VirtualBox:/home/dzt/android_vlc/android# sh compile.sh

For an ARMv6 device without FPU:

$ export NO_FPU=1

For an ARMv5 device:

$ export NO_ARMV6=1



If you plan to use a release build, run 'compile.sh release'

VLC source not found, cloning

正克隆到 'vlc'...

remote: Counting objects: 426425, done.

remote: Compressing objects: 100% (80869/80869), done.

remote: Total 426425 (delta 343977), reused 425830 (delta 343585)

接收对象中: 100% (426425/426425), 237.54 MiB | 201.00 KiB/s, done.

处理 delta 中: 100% (343977/343977), done.

检查连接... 完毕。

Checking out files: 100% (3413/3413), done.

切换到一个新分支 'android'

Building tools





我下载的是r9d

须要更新compile.sh文件,假设NDK版本号过低或过高会提示:You need the NDKv9 or later

此时就须要改动compile.sh文件

root@dzt-VirtualBox:/home/dzt/android_vlc/android# gedit compile.sh





# try to detect NDK version

REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)

echo $REL    //打印出版本号

case "$REL" in

    9|9*)       #主要改动这一行

        GCCVER=4.8

        CXXSTL="/"${GCCVER}

    ;;

    7|8|*)

        echo "You need the NDKv9 or later"

        exit 1

    ;;

esac

相关库的下载:http://download.videolan.org/pub/contrib/有可能会进不去,我是用了VPN

依赖的一些库。这些库在编译过程中会进行下载。但有可能会下载失败。此时就须要手动去下载,复制到这个文件夹下。

dzt@dzt-VirtualBox:~/android_vlc/android/vlc/contrib/tarballs$ ls
a52dec-0.7.4.tar.gz libebml-1.3.0.tar.bz2 LibVNCServer-0.9.9.tar.gz
ffmpeg-2763179.tar.gz libgcrypt-1.6.1.tar.bz2 libvorbis-1.3.4.tar.xz
flac-1.3.0.tar.xz libgpg-error-1.13.tar.bz2 libxml2-2.9.1.tar.gz
freetype-2.5.3.tar.gz libgsm_1.0.13.tar.gz live.2014.05.27.tar.gz
fribidi-0.19.6.tar.bz2 libiconv-1.14.tar.gz nettle-2.6.tar.gz
gmp-6.0.0.tar.bz2 libmad-0.15.1b.tar.gz openjpeg-1.5.0.tar.gz
gnutls-3.1.25.tar.xz libmatroska-1.4.1.tar.bz2 opus-1.1.tar.gz
jpegsrc.v9a.tar.gz libmodplug-0.8.8.5.tar.gz postproc-git.tar.gz
libass-0.11.2.tar.gz libmpeg2-0.5.1.tar.gz speexdsp-git.tar.gz
libdvbpsi-1.2.0.tar.bz2 libogg-1.3.2.tar.xz speex-git.tar.gz
libdvdcss-1.2.13.tar.bz2 libpng-1.6.12.tar.xz taglib-1.9.1.tar.gz
libdvdnav-git.tar.xz libssh2-1.4.3.tar.gz zlib-1.2.8.tar.gz
libdvdread-4.9.9.tar.bz2 libtheora-1.1.1.tar.xz

以上库的下载地址:http://pan.baidu.com/s/1jGJukq6

在编译过程中遇到的问题整理

问题一

=== configuring in gettext-runtime (/home/dzt/android_vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gettext/gettext-runtime)

configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi' '--datarootdir=/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/share' '--includedir=/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/include'
'--libdir=/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/lib' '--build=i686-linux-gnu' '--host=arm-linux-androideabi' '--target=arm-linux-androideabi' '--program-prefix=' '--enable-static' '--disable-shared' '--disable-dependency-tracking'
'--with-pic' '--disable-java' '--disable-native-java' '--without-emacs' 'build_alias=i686-linux-gnu' 'host_alias=arm-linux-androideabi' 'target_alias=arm-linux-androideabi' 'CC=arm-linux-androideabi-gcc --sysroot=/home/dzt/android_vlc/android/android-ndk-r9d/platforms/android-9/arch-arm'
'CFLAGS= -g -mfpu=vfpv3-d16 -mcpu=cortex-a8 -mthumb -mfloat-abi=softfp -O2 -I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include -I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include
-I/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/include -g' 'LDFLAGS= -L/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/lib' 'CPPFLAGS= -g -mfpu=vfpv3-d16 -mcpu=cortex-a8 -mthumb -mfloat-abi=softfp -O2 -I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include
-I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/include' 'CXX=arm-linux-androideabi-g++ --sysroot=/home/dzt/android_vlc/android/android-ndk-r9d/platforms/android-9/arch-arm'
'CXXFLAGS= -g -mfpu=vfpv3-d16 -mcpu=cortex-a8 -mthumb -mfloat-abi=softfp -O2 -I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include -I/home/dzt/android_vlc/android/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include
-I/home/dzt/android_vlc/android/vlc/contrib/arm-linux-androideabi/include -g' --cache-file=/dev/null --srcdir=.

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for arm-linux-androideabi-strip... arm-linux-androideabi-strip

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking whether make supports nested variables... yes

checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc --sysroot=/home/dzt/android_vlc/android/android-ndk-r9d/platforms/android-9/arch-arm

checking whether the C compiler works... no

configure: error: in `/home/dzt/android_vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gettext/gettext-runtime':

configure: error: C compiler cannot create executables

See `config.log' for more details

configure: error: ./configure failed for gettext-runtime

make: *** [.gettext] 错误 77



fix:

因为我的机器的32位的。我用了64位的软件,把SDK和NDK换成32位的就没这个问题了。

问题二:

checking whether byte ordering is bigendian... no

checking for pthread_create in -lpthread... no

configure: error: pthread needed

make: *** [.dvdnav] 错误 1



Fix:

我依照上面的步骤又一次下载一遍就没有报这个错误。

我之前是

第一步git clone git://git.videolan.org/vlc-ports/android.git

再做后面的事,所以才报了这个问题。我所有删除后再按上面的步骤运行相当顺利。

问题三:

-set-mode-check:



-set-debug-files:



-check-env:

[checkenv] Android SDK Tools Revision 23.0.2

[checkenv] Installed at /home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk



-setup:

[echo] Project Name: VLC

[gettype] Project Type: Application



-set-debug-mode:



-debug-obfuscation-check:



-pre-build:



-build-setup:

[getbuildtools] Using latest Build Tools: 20.0.0

[echo] Resolving Build Target for VLC...



BUILD FAILED

/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:542: Unable to resolve project target 'android-19'



Total time: 6 seconds

make: *** [vlc-android/bin/VLC-debug.apk] 错误 1

rm android-libs/libmedia.c android-libs/libutils.c android-libs/libstagefright.c android-libs/libbinder.c

root@dzt-VirtualBox:/home/dzt/android_vlc/android#





Fix:

出错原因

BUILD FAILED

/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:542: Unable to resolve project target 'android-19'

由于我没有安装"android-19"的SDK。

解决的方法有两种(经实验第一种方法不可行)

1、改动工程属性文件vlc-android/project.properties文件

# This file is automatically generated by Android Tools.

# Do not modify this file -- YOUR CHANGES WILL BE ERASED!

#

# This file must be checked in Version Control Systems.

#

# To customize properties used by the Ant build system use,

# "ant.properties", and override values to adapt the script to your

# project structure.



# Project target.



target=android-18

android.library.reference.1=../java-libs/appcompat

android.library.reference.2=../java-libs/SlidingMenu

android.library.reference.3=../java-libs/WheelView



2、安装"android-19"SDK就可以,执行下面命令

root@dzt-VirtualBox:/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk# tools/android

出现例如以下画面。下载你须要的SDK就可以,但不一定都能下载。由于近期连google都无法连上,你懂的

VLC For Android Ubuntu14.04编译环境搭建-LMLPHP



问题四:

BUILD FAILED

/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:601: The following error occurred while executing this line:

/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:542: Unable to resolve project target 'android-19'



Total time: 11 seconds

make: *** [vlc-android/bin/VLC-debug.apk] 错误 1

rm android-libs/libmedia.c android-libs/libutils.c android-libs/libstagefright.c android-libs/libbinder.c



Fix:

这里依据自己所安装的SDK包进行更改

android/vlc-android/project.properties

还有java-libs文件夹下,最好是查找出来,改动全部的android-x,包含AndroidManifest.xml文件

dzt@dzt-VirtualBox:~/android_vlc/android/java-libs$ find ./ -name project.properties

./SlidingMenu/project.properties

./WheelView/project.properties

./appcompat/project.properties



android/java-libs/SlidingMenu/project.properties

android/java-libs/WheelView/project.properties

android/java-libs/appcompat/project.properties文件里的android-x,

可是对于vlc-android0.0.5版本号的一定是4.0及以上版本号(由于0.0.5版本号的界面须要4.0及以上的特性)所以这里一定是14及以上,

否则还会报错error: Error retrieving parent for item: No resource found that matches the given name'android:Widget.Holo.ActionBar'.



编译时仅仅是这里须要4.0这个包的界面特性,可是不影响终于生成的APK的执行目标(仅仅要不调用4.0及以上的API),比方我这里在AndroidManifest.xml中能够设置

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="18" />,又一次运行编译命令。

假设还是报错就建议安装提示的SDK最简单



问题五:

-compile:
[javac] Compiling 95 source files to /home/dzt/android_vlc/android/vlc-android/bin/classes
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:64: 找不到符号
[javac] 符号: 类 Presentation
[javac] 位置: 软件包 android.app
[javac] import android.app.Presentation;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:80: 找不到符号
[javac] 符号: 类 MediaRouter
[javac] 位置: 软件包 android.media
[javac] import android.media.MediaRouter;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:127: 找不到符号
[javac] 符号: 类 MediaRouter
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity
[javac] private MediaRouter mMediaRouter;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:128: 软件包 MediaRouter 不存在
[javac] private MediaRouter.SimpleCallback mMediaRouterCallback;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2141: 找不到符号
[javac] 符号: 类 Presentation
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity
[javac] private final class SecondaryDisplay extends Presentation {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/audio/AudioService.java:672: 找不到符号
[javac] 符号: 变量 JELLY_BEAN
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2140: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:245: 找不到符号
[javac] 符号: 变量 JELLY_BEAN
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:496: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:554: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1024: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1686: 找不到符号
[javac] 符号: 变量 JELLY_BEAN
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2086: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2113: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/libvlc/LibVLC.java:103: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR2
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] else if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR2)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java:63: 找不到符号
[javac] 符号: 变量 JELLY_BEAN
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java:68: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java:73: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR2
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java:78: 找不到符号
[javac] 符号: 变量 KITKAT
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/audio/AudioService.java:733: 找不到符号
[javac] 符号: 变量 bigContentView
[javac] 位置: 类 android.app.Notification
[javac] notification.bigContentView = view_expanded;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java:149: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java:468: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR1
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:251: 找不到符号
[javac] 符号: 类 MediaRouter
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity
[javac] mMediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:251: 找不到符号
[javac] 符号: 变量 MEDIA_ROUTER_SERVICE
[javac] 位置: 类 android.content.Context
[javac] mMediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:252: 软件包 MediaRouter 不存在
[javac] mMediaRouterCallback = new MediaRouter.SimpleCallback() {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:271: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] setContentView(mPresentation == null ? R.layout.player : R.layout.player_remote_control);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:388: 运算符 != 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation != null && !mSettings.getBoolean("enable_secondary_display_hardware_acceleration", false)) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:411: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation == null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:502: 运算符 != 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation != null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:504: 找不到符号
[javac] 符号: 方法 dismiss()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] mPresentation.dismiss();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:559: 找不到符号
[javac] 符号: 变量 MediaRouter
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity
[javac] mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_LIVE_VIDEO, mMediaRouterCallback);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:696: 找不到符号
[javac] 符号: 变量 JELLY_BEAN_MR2
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1030: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation == null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1034: 找不到符号
[javac] 符号: 方法 getWindow()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] sw = mPresentation.getWindow().getDecorView().getWidth();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1035: 找不到符号
[javac] 符号: 方法 getWindow()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] sh = mPresentation.getWindow().getDecorView().getHeight();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1041: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation == null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1115: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation == null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1206: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (coef > 2 && mPresentation == null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1642: 运算符 != 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation != null) mOverlayBackground.setVisibility(View.VISIBLE);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1668: 运算符 != 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation != null) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1692: 找不到符号
[javac] 符号: 变量 SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
[javac] 位置: 类 android.view.View
[javac] layout = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1692: 找不到符号
[javac] 符号: 变量 SYSTEM_UI_FLAG_LAYOUT_STABLE
[javac] 位置: 类 android.view.View
[javac] layout = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1692: 不兼容的类型
[javac] 找到: boolean
[javac] 须要: int
[javac] layout = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:1705: 运算符 == 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation == null)
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2092: 软件包 MediaRouter 不存在
[javac] MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute(
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2093: 找不到符号
[javac] 符号: 变量 MediaRouter
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity
[javac] MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2101: 找不到符号
[javac] 符号: 方法 setOnDismissListener(android.content.DialogInterface.OnDismissListener)
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] mPresentation.setOnDismissListener(mOnDismissListener);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2103: 找不到符号
[javac] 符号: 方法 show()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] mPresentation.show();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2104: 找不到符号
[javac] 符号: 类 InvalidDisplayException
[javac] 位置: 接口 android.view.WindowManager
[javac] } catch (WindowManager.InvalidDisplayException ex) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2123: 运算符 != 不能应用于 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay,<nulltype>
[javac] if (mPresentation != null) mPresentation.dismiss();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2123: 找不到符号
[javac] 符号: 方法 dismiss()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] if (mPresentation != null) mPresentation.dismiss();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2133: 运算符 == 不能应用于 android.content.DialogInterface,org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] if (dialog == mPresentation) {
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2154: 找不到符号
[javac] 符号: 方法 setOwnerActivity(android.app.Activity)
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] setOwnerActivity((Activity) context);
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2181: 找不到符号
[javac] 符号: 方法 getOwnerActivity()
[javac] 位置: 类 org.videolan.vlc.gui.video.VideoPlayerActivity.SecondaryDisplay
[javac] VideoPlayerActivity activity = (VideoPlayerActivity)getOwnerActivity();
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java:2164: 方法不会覆盖或实现超类型的方法
[javac] @Override
[javac] ^
[javac] /home/dzt/android_vlc/android/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java:70: 找不到符号
[javac] 符号: 变量 JELLY_BEAN
[javac] 位置: 类 android.os.Build.VERSION_CODES
[javac] (VERSION.SDK_INT <= VERSION_CODES.JELLY_BEAN)));
[javac] ^
[javac] 56 错误 BUILD FAILED
/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/dzt/android_tools/adt-bundle-linux-x86-20140702/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details. Total time: 26 seconds
make: *** [vlc-android/bin/VLC-debug.apk] 错误 1
rm android-libs/libmedia.c android-libs/libutils.c android-libs/libstagefright.c android-libs/libbinder.c
root@dzt-VirtualBox:/home/dzt/android_vlc/android#

Fix:

使用最新的SDK就能够了

总结:

在编译的过程中碰到非常多问题,有问题能够先百度一下,看别人有没有碰到类似的情况,一般都能在网上找到答案。须要详细问题详细分析,假设找不到要想下自己运行的步骤跟官网上的是否一致。

实在没办法就按步骤多试几遍或许能行。

05-08 14:56