2015年3月24日 星期二

[Android] vlc android compile ubuntu14


1.環境:

主機:Windows 7(64bit)

虛擬機:VirtualBox-Version 4.3.12 Edition

虛擬機系統:ubuntu-14.04-desktop-amd64

環境需求:
在Linux系统上,我安裝的是Ubuntu14.04
===============================================
2. 需要安裝的工具:
apache-ant (or ant), autoconf, automake, autopoint, cmake, gawk (or nawk), gcc, g++, libtool, git,
m4, patch, pkg-config, ragel, subversion, unzip.

ps: 如果是編訪Android-x86設備,需安裝 yasm

開始安裝:
安裝第一個套件:ant, 執行安裝指令# sudo apt-get install ant, 得到結果是,一些網路上位址的檔案無法取得,這時可以下# sudo apt-get update 或是加上--fix-missing 去更新連結位址。(如下圖一)
圖一

更新完下載位址,重新執行 sudo apt-get install ant,便可取得完整的路徑,並可順利安裝,如圖二、三、四。
圖二

圖三
圖四
其它檔案,如 autoconf, automake, autopoint, cmake, gawk (or nawk), gcc, g++, libtool, git,
m4, patch, pkg-config, ragel, subversion, unzip.,依此類推。

protobuf-2.4.1:
https://pixhawk.ethz.ch/installation/ubuntu
=====================================================

3.Android SDK

The Android SDK archive initially contains only the basic SDK tools. It does
not contain an Android platform or any third-party libraries. In fact, it
doesn't even have all the tools you need to develop an application.

In order to start developing applications, you must install the Platform-tools
and at least one version of the Android platform, using the SDK Manager.

Platform-tools contains build tools that are periodically updated to support new
features in the Android platform (which is why they are separate from basic
SDK tools), including adb, dexdump, and others.

To install Platform-tools, Android platforms and other add-ons, you must
have an Internet connection, so if you plan to use the SDK while
offline, please make sure to download the necessary components while online.

To start the SDK Manager, please execute the program "android".

From the command-line you can also directly trigger an update by
executing:

在android-sdk-linux目錄下執行
#  tools/android update sdk --no-ui

Tip: use --help to see the various command-line options.

problem:
Android adb not found
http://stackoverflow.com/questions/13571145/android-adb-not-found

================================================
4.Android NDK
get android ndk from http://developer.android.com/tools/sdk/ndk/index.html

use 7-zip to Decompress the file of android-ndk-r10d-linux-x86_64.bin

檔案解壓縮可下載7-zip

=====================================================
5.配置NDK、SDK、JDK環境變量:

1)终端root帳戶命令:

# sudo gedit ~/.bashrc

待彈出頁面在相面末尾加入下列幾行(具体目錄依自已定義):

export NDK=/home/ken/develop/android-ndk-r10d
export ANDROID_SDK=/home/ken/develop/android-sdk-linux
export ANDROID_NDK=/home/ken/develop/android-ndk-r10d
export ANDROID_ABI=armeabi-v7a
export NO_NEON=1
export JAVA_HOME=/home/ken/jdk/jdk1.8.0_40
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

2)然後保存,使其生效 终端命令行:

# source ~/.bashrc

3)檢測環境變數配置是否正確:

ndk可以進入ndk下sample目录里的hello-jni进行$NDK/ndk-build 命令編譯。JDK可以在root终端命令下(非root需要在編輯~/.bashrc)執行:java -version 如果顯示JDK相關的

版本號則為安装正確。

來源: http://www.cnblogs.com/wainiwann/p/3849387.html
===================================================
6.編譯

git clone git://git.videolan.org/vlc-ports/android.git  =>time out
http://stackoverflow.com/questions/19808059/unable-to-run-git-clone-from-git-videolan-org

執行 # sh ./compile.sh

問題1、You must define ANDROID_NDK, ANDROID_SDK and ANDROID_ABI before starting
     ANDROID_ABI should match your ABI: armeabi-v7a, armeabi or …
解決方式:執行# source ~/.bashrc

來源: http://blog.csdn.net/cleanness/article/details/21086965


問題2.
autoreconf: running: autopoint --force
autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac
               file requires the infrastructure from gettext-0.19.3 but this version
               is older. Please upgrade to gettext-0.19.3 or newer.
autopoint: *** Stop.
autoreconf: autopoint failed with exit status: 1
make: *** [.gpg-error] Error 1
contribs: make failed

$ gettext --version
gettext (GNU gettext-runtime) 0.18.3
http://stackoverflow.com/questions/30259182/build-vlc-for-android-project-failed-on-ubuntu-12-04

Unable to run git clone from git.videolan.orghttp://www.videolan.org/vlc/download-sources.html






沒有留言:

張貼留言