How to compile ijkplayer-android under ubuntu

The previous piece of text talked about compiling in cygwin of windows. It was really a variety of pits. The soft link could not be recognized, the x86 and 86_64 so files could not be compiled, etc. I tossed for a few days and still did not perfect in cygwin. To compile ijkplayer, I used my colleague's ubuntu computer today. The mutation of ijkplayer-android is really fast and very fast.

**1. Prerequisite: **

Here are the official tips:

# install homebrew, git, yasm
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew install yasm
# Need to configure SDK and NDK path
# add these lines to your ~/.bash_profile or ~/.profile
# export ANDROID_SDK=<your sdk path 
# export ANDROID_NDK=<your ndk path 
# Software to be installed under Cygwin
# on Cygwin(unmaintained)
# install git, make, yasm

In ubuntu environment, enter home/xxx/

xxx represents your name. After entering the directory, press Ctrl+H to see the hidden files, and you can see:

. bashrc file, where you can configure environment variables similar to path under windows,

After opening, add your ANDROID_NDK and ANDROID_SDK paths. My configuration is as follows:

NDK=/home/hudong/platform-tools/android-ndk-r11b
export NDK
ADB=/home/hudong/Android/Sdk/platform-tools
export ADB
# Our ANDROID_NDK and ANDROID_SDK path
ANDROID_NDK=/home/hudong/platform-tools/android-ndk-r11b
export ANDROID_NDK
ANDROID_SDK=/home/hudong/android-sdk
export ANDROID_SDK 
# Add to PATH
PATH=${PATH}:${NDK}:${ADB}:${ANDROID_NDK}:&{ANDROID_SDK}

Before compiling, we need to install some software. We don’t need to install make. Make needs to be installed under cygwin.

As for git, I think everyone has installed it. If it is not installed, enter the following commands to install git and yasm:

sudo apt-get update
sudo apt-get install git
sudo apt-get install yasm

2. system version:

**3. Compilation steps: **

# Pull the source code directly to the local
git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
cd ijkplayer-android
# Check update code
git checkout -B latest k0.5.1
# Initialization, will pull the ffmpeg code to the local and so on
. /init-android.sh
cd android/contrib
. /compile-ffmpeg.sh clean
# Compile ffmpeg soft decoding library
. /compile-ffmpeg.sh all
cd ..
# Various versions of so files will be generated
. /compile-ijk.sh all

Executing ./compile-ffmpeg.sh all is to compile ffmpeg. It will take a little longer. As long as your configuration and software installation are correct, you can see:

It shows that ffmpeg has been compiled successfully, and the next step is to compile ijkplayer.

**4. Import into Android Studio: **

I don't need to explain this, it's the same as importing an ordinary project:

**5. Latest streamlined source code: **

code address: https://github.com/Dawish/ijkplayer-demo

The directory after simplifying the code:

The above method to compile ijkplayer-android under ubuntu is all the content shared by the editor, I hope to give you a reference.

Recommended Posts

How to compile ijkplayer-android under ubuntu
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
How to easily compile openJDK in Ubuntu
How to change MySQL password under Ubuntu
How to upgrade to Ubuntu 20.04
How to install vim editor under Linux (Ubuntu 18.04)
How to enable Mysql remote access under Ubuntu 14.04
How to install gcc compiler faster under Ubuntu
How to upgrade to Ubuntu 16.04 LTS
How to install two versions of OpenCV under ubuntu?
How to open https on nginx server under Ubuntu
How to install Helm in Ubuntu
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to use hanlp in ubuntu
How to install VirtualBox on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install MySQL on Ubuntu 20.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install mysql in Ubuntu 14.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04
How to install MemSQL on Ubuntu 14.04
How to install Go on Ubuntu 20.04
How to install MongoDB on Ubuntu 16.04
How to install Mailpile on Ubuntu 14.04
How to install PrestaShop on Ubuntu 16.04
How to upgrade to PHP 7 on Ubuntu 14.04
How to install Skype on Ubuntu 20.04
How to install Jenkins on Ubuntu 20.04
How to install Python 3.8 on Ubuntu 18.04
How to install KVM on Ubuntu 18.04
How to install KVM on Ubuntu 20.04
How to install opencv3.0.0 on ubuntu14.04
How to install Anaconda on Ubuntu 20.04
How to install Prometheus on Ubuntu 16.04
How to install Jenkins on Ubuntu 18.04
How to deploy Django on Ubuntu 14.04
How to install Apache on Ubuntu 20.04
How to install R on Ubuntu 20.04
How to install Moodle on Ubuntu 16.04
How to install Solr 5.2.1 on Ubuntu 14.04
How to install Teamviewer on Ubuntu 16.04
How to secure Nginx on Ubuntu 14.04
How to install MariaDB on Ubuntu 20.04
How to install Nginx on Ubuntu 20.04
How to install Mono on Ubuntu 20.04
How to install Go on Ubuntu 20.04
How to install Zoom on Ubuntu 20.04
How to compile and install PHP and Nginx in Ubuntu environment
How to install mysql in Ubuntu 14.04