Ijkplayer: must define ANDROID_NDK, ANDROID_SDK before starting

Created on 10 Mar 2016  ·  9Comments  ·  Source: bilibili/ijkplayer

i have defined ANDROID_NDK ANDROID_SDK but runing ./compile-ffmpeg.sh all

errors:
build on Darwin x86_64
ANDROID_SDK=
ANDROID_NDK=
You must define ANDROID_NDK, ANDROID_SDK before starting.
They must point to your NDK and SDK directories.

My Build Enviroment:
Mac OS X 10.11.1
Android NDK r10e
ANDROID STUDIO 1.4

Most helpful comment

you need PATH environment variable
open terminal

export ANDROID_SDK=<your sdk path>
export ANDROID_NDK=<your ndk path>

All 9 comments

Before Build

# install homebrew, git, yasm
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew install yasm

# add these lines to your ~/.bash_profile or ~/.profile
# export ANDROID_SDK=<your sdk path>
# export ANDROID_NDK=<your ndk path>

# on Cygwin (unmaintained)
# install git, make, yasm

https://github.com/Bilibili/ijkplayer/blob/master/README.md

homebrew have installed
NDK have installed and successful

ndk-build:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
/Users/Kelvin/Downloads/android-ndk-r10e/build/core/build-local.mk:143: *** Android NDK: Aborting . Stop

but
errors:
build on Darwin x86_64
ANDROID_SDK=
ANDROID_NDK=
You must define ANDROID_NDK, ANDROID_SDK before starting.
They must point to your NDK and SDK directories.
@gabong
@bbcallen

you need PATH environment variable
open terminal

export ANDROID_SDK=<your sdk path>
export ANDROID_NDK=<your ndk path>

mine terminal 's vi ~/.bash_profile
export PATH=$PATH:/Users/Kelvin/Downloads/android-ndk-r10e
export PATH=$PATH:/Users/Kelvin/Library/Android/sdk/platform-tools

if :
export ANDROID_SDK=/Users/Kelvin/Downloads/android-ndk-r10e
export ANDROID_NDK=/Users/Kelvin/Library/Android/sdk/platform-tools

ndk-build can't found

source ~/. bash_profile

you can just use export command in shell not edit bash_profile

I HAVE BEEN DONE:

edit bash_profile

USE export ANDROID_NDK=....REPLACE OF export ANDROID_NDK=. PATH=$PATH:

Thanks!!!

After doing this
export PATH=$PATH:/Users/xxx/Downloads/android-ndk-r10e
export PATH=$PATH:/Users/xxx/Library/Android/sdk/platform-tools

export ANDROID_SDK=/Users/xxx/Downloads/android-ndk-r10e
export ANDROID_NDK=/Users/xxx/Library/Android/sdk/platform-tools

then
source ~/. bash_profile

Everything seem work fine!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LucXion picture LucXion  ·  3Comments

binaryxiaobao picture binaryxiaobao  ·  4Comments

xuluming picture xuluming  ·  4Comments

Tan-zy picture Tan-zy  ·  4Comments

lingcimi picture lingcimi  ·  3Comments