Compiling FFmpeg lib and add it to NDK sources on Windows8

Can you paste what's in your build_android.sh file which you've copied inside the FFmpeg directory?

I've got the same error when one of the variables defined at the start of the script where set incorrectly. Check to see if your NDK or SYSROOT or TOOLCHAIN variables are set to a valid path!

I've tried using the following steps and it worked for me:

1) Download FFmpeg

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

2) Create a file called build_android.sh inside the FFmpeg directory

cd ffmpeg; touch build_ffmpeg_for_android.sh;

3) Add the following content to the file

#!/usr/bin/env bash

NDK=$HOME/Software/Android/android-ndk-r10/
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64

function build_one
{
./configure \
    --prefix=$PREFIX \
    --enable-shared \
    --disable-static \
    --disable-doc \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --disable-avdevice \
    --disable-doc \
    --disable-symver \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=linux \
    --arch=arm \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
    --extra-ldflags="$ADDI_LDFLAGS" \
    $ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"

build_one

4) Make the script executable

chmod +x build_ffmpeg_for_android.sh

5) Start the build of FFmpeg for Android (ARM)
(run the script with Bash, i.e. /usr/bin/bash not /usr/bin/sh)

./build_ffmpeg_for_android.sh