Open sunkeding opened 6 years ago
看你的代码并没有配置好ANDROID_SDK 和ANDROID_NDK
正确写法: export ANDROID_NDK=/Users/skd/android-ndk-r10e export PATH=$PATH:$ANDROID_NDK 目前以解决该问题,然后由于非r10版本的ndk的会报错误,因此重写下载r10e版本的ndk: https://developer.android.google.cn/ndk/downloads/older_releases
按照文档走下来的,ndk环境也配置了skddeMacBook-Pro:contrib skd$ ./compile-ffmpeg.sh all
[*] check archs
FF_ALL_ARCHS = armv5 armv7a arm64 x86 x86_64 FF_ACT_ARCHS = armv5 armv7a arm64 x86 x86_64
==================== [*] check env armv5
FF_ARCH=armv5 FF_BUILD_OPT=
[*] make NDK standalone toolchain
build on Darwin x86_64 ANDROID_NDK= You must define ANDROID_NDK before starting. They must point to your NDK directories.
NDK环境配置成功,证明如下: skddeMacBook-Pro:~ skd$ cd /Users/skd/Downloads/android-ndk-r10e/samples skddeMacBook-Pro:samples skd$ cd hello-jni skddeMacBook-Pro:hello-jni skd$ ndk-bundle -bash: ndk-bundle: command not found skddeMacBook-Pro:hello-jni skd$ cd ~skd skddeMacBook-Pro:~ skd$ cd /Users/skd/Downloads/android-ndk-r10e/sample -bash: cd: /Users/skd/Downloads/android-ndk-r10e/sample: No such file or directory skddeMacBook-Pro:~ skd$ cd /Users/skd/Downloads/android-ndk-r10e/samples skddeMacBook-Pro:samples skd$ cd hello-jni/ skddeMacBook-Pro:hello-jni skd$ ndk-build [arm64-v8a] Gdbserver : [aarch64-linux-android-4.9] libs/arm64-v8a/gdbserver [arm64-v8a] Gdbsetup : libs/arm64-v8a/gdb.setup [x86_64] Gdbserver : [x86_64-4.9] libs/x86_64/gdbserver [x86_64] Gdbsetup : libs/x86_64/gdb.setup [mips64] Gdbserver : [mips64el-linux-android-4.9] libs/mips64/gdbserver [mips64] Gdbsetup : libs/mips64/gdb.setup [armeabi-v7a] Gdbserver : [arm-linux-androideabi-4.8] libs/armeabi-v7a/gdbserver [armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup [armeabi] Gdbserver : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver [armeabi] Gdbsetup : libs/armeabi/gdb.setup [x86] Gdbserver : [x86-4.8] libs/x86/gdbserver [x86] Gdbsetup : libs/x86/gdb.setup [mips] Gdbserver : [mipsel-linux-android-4.8] libs/mips/gdbserver [mips] Gdbsetup : libs/mips/gdb.setup [arm64-v8a] Install : libhello-jni.so => libs/arm64-v8a/libhello-jni.so [x86_64] Install : libhello-jni.so => libs/x86_64/libhello-jni.so [mips64] Install : libhello-jni.so => libs/mips64/libhello-jni.so [armeabi-v7a] Install : libhello-jni.so => libs/armeabi-v7a/libhello-jni.so [armeabi] Install : libhello-jni.so => libs/armeabi/libhello-jni.so [x86] Install : libhello-jni.so => libs/x86/libhello-jni.so [mips] Install : libhello-jni.so => libs/mips/libhello-jni.so skddeMacBook-Pro:hello-jni skd$
.bash_profile文件里的代码如下: export PATH=${PATH}:/Users/skd/Library/Android/sdk/platform-tools
export ANDROID_SDK=</Users/skd/Library/Android/sdk
export PATH=/usr/local/bin:$PATH
export PATH=${PATH}:/Users/skd/Downloads/android-ndk-r10e export NDK=/Users/skd/Downloads/android-ndk-r10e export ANDROID_NDK
感觉都已经配置成功了,但是按照步骤下来就卡在./compile-ffmpeg.sh all命令了