`
zsnlovewl
  • 浏览: 176523 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

VLC for Android on Linux

 
阅读更多

来自:http://wiki.videolan.org/AndroidCompile

 

This page is an introduction to the compilation of VLC for Android on Linux.

Contents

 [hide

Eclipse, SDK and NDK installation

Requirements

  • You MUST be on Linux, and a recent one.
  • You MUST have installed: apache-ant (or ant ), autoconf , automake , autopoint , libtool , gawk (or nawk ), gcc , g++ , pkg-config , cmake , patch , subversion , and very up-to-date versions of those tools.
  • You MUST install: git .

Android SDK

  1. Create a working directory android .
  2. Go to Android SDK page and download the latest SDK for linux.
  3. Decompress into android folder.
  4. Run tools/android (from the command line you can also run: "tools/android update sdk -u -t platform,platform-tool,extra")
  5. In the tool, install "SDK Platform Android 4.0, API 14" , and follow the instructions.

You can have more details , if needed.

Android NDK

  1. Check that the SDK installation is correct.
  2. Go to Android NDK page and download the latest NDK for linux.
  3. Decompress into android folder, next to your android-sdk-linux folder.

Eclipse

As used by your distribution, install Eclipse with your package manager:

apt-get install eclipse (debian)
yum install eclipse (Fedora)
pacman -S eclipse (Arch)
emerge -av eclipse-sdk (Gentoo)
...

And run it, at least once, and then quit eclipse.

Note: On Debian-based distributions it is better to download Eclipse indigo builds from the official website: http://www.eclipse.org/downloads/ , otherwise it can lead to an error when importing the ADT plugin (see following).

ADT

The ADT plugin is required to compile on Android.

  1. Go to ADT page .
  2. Start Eclipse, then select Help > Install New Software....
  3. Add the "ADT Plugin" repository with https://dl-ssl.google.com/android/eclipse/ as URL
  4. Validate and select the checkbox next to Developer Tools and click Next, Next, Finish.
  5. Restart Eclipse.
  6. Go to Menu > Window > Preferences... and then Android from the left pane.
  7. Point the SDK Location in to your downloaded SDK directory.
  8. Ok, and quit Eclipse.

See extra information here .

Environment setup

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, any other device uses armeabi .

export ANDROID_ABI=armeabi-v7a

or

export ANDROID_ABI=armeabi

If you plan to use an armeabi-v7a device that does not support NEON, you need a build without NEON

export NO_NEON=1

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

Examples

  • For a normal (2012 consumer phone or tablet), like Cortex-A8 or Cortex-A9
export ANDROID_ABI=armeabi-v7a
  • For a Tegra2 device
export ANDROID_ABI=armeabi-v7a
export NO_NEON=1
  • For an ARMv6 device
export ANDROID_ABI=armeabi
  • For an ARMv6 device without FPU
export ANDROID_ABI=armeabi
export NO_FPU=1
  • For an ARMv5 device or the emulator
export ANDROID_ABI=armeabi
export NO_ARMV6=1

Those exports must be set at all times, notably for the contribs and the configure.

Building

Get VLC Source

Clone the source from the VLC git!

In your android folder, run:

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

 

Compile

Read compile.sh first, as it contains some very useful and important information. Then run it:

sh compile.sh

Note: At this point, you will get an autogenerated debug apk in the bin/ folder, signed with a debug key.

In order to build a non-debug package:

sh compile.sh release

Note: At this point, you will get an unsigned release apk in the bin/ folder, which you will have to sign and zipalign .

Package in Eclipse [optional]

  1. In Eclipse, create a new Android Project from existing source by importing from the vlc-android path.
  2. Export unsigned/signed apk.

Note: Building against JDK6 is recommended for optimal compatibility (Set Java Compiler Compliance to 1.6).

Run

Run it and enjoy!

Debugging

Here are some helpful links if you wish to debug VLC on Android:

Troubleshooting

Outdated Awk

If you receive the error message while building:

Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !    

The prebuilt version of Awk that comes with the Android NDK is outdated. Defining HOST_AWK in your environment does nothing as the system still tries to just the one that comes with the Android NDK. To get around this issue, simply rename or delete the Awk binary that comes with the Android NDK. For example to move it:

mv $ANDROID_NDK/prebuilt/linux-x86/bin/awk $ANDROID_NDK/prebuilt/linux-x86/bin/awk.old

Can't find Ant

If you're new to Ant, please be aware that some Linux distributions don't install it in the usual spot as with other programs. Try checking to see if the directory /usr/share/java/apache-ant/bin exists and add it to your path.

Outdated autotools-dev

If you get the following error message you may have have an outdated version of autotools-dev:

 Invalid configuration `arm-linux-androideabi': system `androideabi' not recognized

You may first want to check if your distribution has any available updates for this package. Alternatively, you can manually update your config.guess and config.sub files from here: [1] . These files are typically located in /usr/share/misc on Debian based distributions.

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    VLC 安卓播放器 VLC for Android 3.3.4 中文多语免费版.zip

    VLC for Android 是 VLC 媒体播放器到 Android™ 平台的完整端口。它可以播放任何视频和音频文件,网络流和 DVD ISO,例如 VLC 的经典版本。VLC 具有完整的音乐播放器,媒体数据库,均衡器和过滤器以及许多其他功能...

    VLC for Android 1.0.0

    VLC for Android 1.0.0更新内容: Android版VLC应用正式升级至1.0.0版本; 新版修复了ARMv8处理器,Android 5.0上的崩溃问题并在细节处进行了调整; 新版全新的界面已经在黑色和白色主题中使用; 整合了DVD iso和...

    VLC for Android 3.1.5 x86_64版apk、aar及so

    VLC for Android 3.1.5是一款专为Android设备设计的多媒体播放器应用,它基于流行的开源跨平台媒体播放器VLC Media Player。这个版本是针对x86_64架构的Android设备优化的,这意味着它适用于使用64位Intel处理器的...

    vlc compile for android

    This page is an introduction to the compilation of VLC for Android on Linux

    vlc for android beta 0-0-8

    vlc for android beta 0-0-8 。armv7 neon 版本的vlc for android

    VLC for Android 3.1.5 x86版apk、aar及so

    VLC for Android是一款知名的开源媒体播放器,专为Android设备设计。版本3.1.5提供了对多种视频和音频格式的支持,以及丰富的自定义选项,让用户可以在移动设备上享受流畅的多媒体体验。在这个特定的压缩包中,包含...

    VLC for android编译好的项目

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它基于VideoLAN的VLC Media Player,具有跨平台的兼容性和强大的多媒体播放能力。这个编译好的项目意味着它已经过开发人员的构建和配置,可以运行...

    VLC for android 2014.9

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它基于VideoLAN的VLC Media Player,这个跨平台的多媒体解决方案在全球范围内广受欢迎。2014.9版本可能指的是该应用的一个特定更新,这通常是修复...

    vlc for android android 4.2.2 eclipse 可以编译通过的源码

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它基于VideoLAN的VLC Media Player项目,提供跨平台的多媒体播放功能。在这个特定的压缩包中,包含了适用于Android 4.2.2版本的VLC源码,这意味着...

    VLC for Android最新源代码

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它的源代码不仅提供了对各种音频和视频格式的支持,还允许开发者深入了解其工作原理,进行定制化开发或改进。Ubuntu作为Linux发行版,是开发...

    VLC-Android-2.0.6.tar.gz_Weird_android_android vlc_android DVD_

    VLC for Android can play any video and audio files, as well as network streams and DVD ISOs, like the desktop version of VLC. VLC for Android is a full audio player, with a complete database, an ...

    VLC for Android 3.1.5 armeabi-v7a版apk、aar及so

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。这个压缩包包含了VLC 3.1.5版本的特定构建,针对armeabi-v7a架构优化。armeabi-v7a是Android设备上常见的处理器架构之一,支持ARMv7指令集,广泛...

    VLC for Android

    自己编译的VLC for Android,官方最新的源代码,在Android5.0上测试通过

    最新vlc for android 源码

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它的源码提供了深入了解如何在移动平台上实现高效多媒体处理的宝贵机会。本篇将详细探讨VLC for Android源码中的核心知识点,包括多媒体框架、...

    vlc for android 源码4.3导入eclipse可运行

    描述中提到“VLC for Android在Linux下编译后,Eclipse导入可运行”,这意味着开发者需要一个Linux环境来编译源码,这通常涉及到安装必要的构建工具链,如GCC、NDK(Android Native Development Kit)以及可能的交叉...

    VLC for Android额外包tarballs集合

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它允许用户播放各种音频和视频格式,而无需转换或编码。为了构建VLC for Android应用,开发者需要准备一系列额外的包,这些包通常不包含在标准...

    vlc for android

    VLC for Android是一款流行的开源媒体播放器,专为Android设备设计。它基于VideoLAN的VLC Media Player项目,提供跨平台的多媒体播放解决方案。VLC for Android能够处理各种音频和视频格式,包括流媒体,无需额外的...

    VLC for android 2014.12

    VLC for Android是一款广受欢迎的开源媒体播放器,专为Android平台设计,它基于VideoLAN项目的VLC多媒体播放器。2014.12版本是这个应用在当年的一个更新迭代,开发者提到这个版本可能与2014年9月的版本有所不同,...

    VLC for Android 3.1.5 arm64-v8a版apk、aar及so

    VLC for Android 3.1.5 是一个专为Android平台设计的多媒体播放器应用的版本,它基于著名的开源媒体播放器VLC Media Player。这个版本特别针对arm64-v8a架构进行了优化,该架构是Android设备上常见的64位处理器架构...

    vlc android eclipse 工程

    VLC for Android Eclipse 工程是一个专为在Android平台上运行VLC媒体播放器而设计的开发项目,它基于Eclipse IDE进行构建。VLC是一款开源的、跨平台的多媒体播放器,支持各种视频和音频格式,以及网络流媒体。在这个...

Global site tag (gtag.js) - Google Analytics