Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile ijkplayer-android in ubuntu

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains how to compile ijkplayer-android in ubuntu. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's take you to learn how to compile ijkplayer-android in ubuntu!

1. Premise:

Here are the official tips:

# install homebrew, git, yasmruby -e "$(curl -fsSL https://raw.githuusercontent.com/Homebrew/install/master/install)"brew install gitbrew install yasm#SDK and NDK path required # add these lines to your ~/.bash_profile or ~/.profile# export ANDROID_SDK=# export ANDROID_NDK=#Software required to install under Cygwin # on Cygwin (unsupported)# install git, make, yasm

In ubuntu, go to home/xxx/

xxx stands for your name, enter the directory and press Ctrl+H to see hidden files, you can see:

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

After opening it and adding your ANDROID_NDK and ANDROID_SDK path, my configuration is as follows:

NDK=/home/hudong/platform-tools/android-ndk-r11bexport NDKADB=/home/hudong/Android/Sdk/platform-toolsexport ADB#Our ANDROID_NDK and ANDROID_SDK Routes ANDROID_NDK=/home/hudong/platform-tools/android-ndk-r11bexport ANDROID_NDKOID_SDK=/home/hudong/android-sdkexport ANDROID_SDK #Add to ADB PATH Routes PATH=${PATH}:${NDK}:${ANDROID_NDK}:&{ANDROID_SDK}

Before compiling we need to install some software, make we do not need to install, make is installed under cygwin,

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

sudo apt-get updatesudo apt-get install gitsudo 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-androidcd ijkplayer-android#Check the update code git checkout -B latest k0.5.1#Initialization, will pull the ffmpeg code locally, etc. init-android.shcd android/contrib./ compile-ffmpeg.sh clean#compile ffmpeg soft decode library./ compile-ffmpeg.sh allcd ..# Various versions of so files will be generated./ compile-ijk.sh all

Implementation of.../ compile-ffmpeg.sh all is compiling ffmpeg, it takes a little longer, as long as your configuration and software installation are not problematic you can see:

The ffmpeg compilation is successful, and the next step is to compile ijkplayer.

4. Import Android Studio:

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

5. Latest Streamlined Source Code:

Contents after code reduction:

At this point, I believe everyone has a deeper understanding of "how to compile ijkplayer-android in ubuntu," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report