我正在尝试将speex集成到我的程序中,只是为它下载了NDK。我在安装Android NDK时遇到了麻烦(我在Mac OS上)。当我输入
./ndk-build -C ../android_dev/oler_android/
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file:
~/Desktop/android_dev/oler_android//jni/Android.mk
make: Entering directory `/Users/Oler/Desktop/android_dev/oler_android'
/Users/Oler/Desktop/android-ndk/build/core/add-application.mk:187: *** Android NDK:
Aborting... . Stop.
make: Leaving directory `/Users/Oler/Desktop/android_dev/oler_android'
我在jni文件夹下创建了Application.mk和Android.mk。
./ndk-build NDK_LOG = 1
的输出HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
GNUMAKE=/Users/Oler/Desktop/android-ndk/prebuilt/darwin-x86_64/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/Oler/Desktop/android-ndk'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK: Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/Oler/Desktop/android-ndk/prebuilt/darwin-x86_64/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: /Users/Oler/Desktop/android-ndk/prebuilt/darwin-x86_64/bin/awk
Android NDK: Host 'awk' test returned: Pass
Android NDK: Found platform root directory: /Users/Oler/Desktop/android-ndk/platforms
Android NDK: Found supported platforms: android-12 android-13 android-14 android-15 android-16 android-17 android-18 android-19 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-12 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-12/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-12/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-12/arch-x86
Android NDK: PLATFORM android-13 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-13/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-13/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-13/arch-x86
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-14/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-14/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-14/arch-x86
Android NDK: PLATFORM android-15 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-15/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-15/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-15/arch-x86
Android NDK: PLATFORM android-16 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-16/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-16/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-16/arch-x86
Android NDK: PLATFORM android-17 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-17/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-17/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-17/arch-x86
Android NDK: PLATFORM android-18 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-18/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-18/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-18/arch-x86
Android NDK: PLATFORM android-19 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-19/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-19/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-19/arch-x86
Android NDK: PLATFORM android-3 supports: arm
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-5/arch-arm
Android NDK: PLATFORM android-8 supports: arm
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-8/arch-arm
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-9/arch-arm
Android NDK: ABI mips sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-9/arch-mips
Android NDK: ABI x86 sysroot is: /Users/Oler/Desktop/android-ndk/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 12 13 14 15 16 17 18 19 3 4 5 8 9
Android NDK: Found max platform level: 19
Android NDK: This NDK supports the following target architectures and ABIS:
Android NDK: arm: armeabi armeabi-v7a
Android NDK: mips: mips
Android NDK: x86: x86
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: arm-linux-androideabi-4.6: armeabi armeabi-v7a
Android NDK: arm-linux-androideabi-4.8: armeabi armeabi-v7a
Android NDK: arm-linux-androideabi-clang3.3: armeabi armeabi-v7a
Android NDK: mipsel-linux-android-4.6: mips
Android NDK: mipsel-linux-android-4.8: mips
Android NDK: mipsel-linux-android-clang3.3: mips
Android NDK: x86-4.6: x86
Android NDK: x86-4.8: x86
Android NDK: x86-clang3.3: x86
Android NDK: Found project path: ~/Desktop/android_dev/oler_android/
Android NDK: Ouput path for intermediate files: ~/Desktop/android_dev/oler_android//obj
Android NDK: Ouput path for generated library files: ~/Desktop/android_dev/oler_android//libs
Android NDK: Parsing /Users/Oler/Desktop/android-ndk/build/core/default-application.mk
Android NDK: Defaulted to APP_PLATFORM=android-3
Android NDK: APP_PIE is
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ~/Desktop/android_dev/oler_android//jni/Android.mk
/Users/Oler/Desktop/android-ndk/build/core/add-application.mk:187: *** Android NDK: Aborting... . Stop.
答案 0 :(得分:6)
您是否安装并包含了所有必需的文件?你的Makefile是这样的 - 检查是否缺少某些内容:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libspeex
LOCAL_CFLAGS = -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
./libspeex/bits.c \
./libspeex/buffer.c \
./libspeex/cb_search.c \
./libspeex/exc_10_16_table.c \
./libspeex/exc_10_32_table.c \
./libspeex/exc_20_32_table.c \
./libspeex/exc_5_256_table.c \
./libspeex/exc_5_64_table.c \
./libspeex/exc_8_128_table.c \
./libspeex/fftwrap.c \
./libspeex/filterbank.c \
./libspeex/filters.c \
./libspeex/gain_table.c \
./libspeex/gain_table_lbr.c \
./libspeex/hexc_10_32_table.c \
./libspeex/hexc_table.c \
./libspeex/high_lsp_tables.c \
./libspeex/jitter.c \
./libspeex/kiss_fft.c \
./libspeex/kiss_fftr.c \
./libspeex/lpc.c \
./libspeex/lsp.c \
./libspeex/lsp_tables_nb.c \
./libspeex/ltp.c \
./libspeex/mdf.c \
./libspeex/modes.c \
./libspeex/modes_wb.c \
./libspeex/nb_celp.c \
./libspeex/preprocess.c \
./libspeex/quant_lsp.c \
./libspeex/resample.c \
./libspeex/sb_celp.c \
./libspeex/scal.c \
./libspeex/smallft.c \
./libspeex/speex.c \
./libspeex/speex_callbacks.c \
./libspeex/speex_header.c \
./libspeex/stereo.c \
./libspeex/vbr.c \
./libspeex/vq.c \
./libspeex/window.c \
./libogg/bitwise.c \
./libogg/framing.c
include $(BUILD_SHARED_LIBRARY)
最好的方法是在项目配置和安装setups中进行双重检查。