当前位置: 首页 > 工具软件 > android-jobs > 使用案例 >

android flac,android - Flac Extension for Exoplayer - Stack Overflow

席乐童
2023-12-01

I am trying to compile flac extensions to use with Android Studio, ExoPlayer in my project. I tried following the instructions in the ExoPlayer README however, I get the following error:

cd ExoPlayer

EXOPLAYER_ROOT="$(pwd)"

FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"

NDK_PATH="~/Downloads/android-ndk-r17c"

cd "${FLAC_EXT_PATH}/jni"

mv ~/Downloads/flac-1.3.2 flac

${NDK_PATH}/ndk-build APP_ABI=all -j4

...:~/Downloads/ExoPlayer/extensions/flac/src/main/jni$

NDK_PATH=.../Downloads/android-ndk-r17c

...:~/Downloads/ExoPlayer/extensions/flac/src/main/jni$ ${NDK_PATH}/ndk-build APP_ABI=all -j4

Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersion 1 in .../Downloads/ExoPlayer/extensions/flac/src/main/AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.

Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.

[arm64-v8a] Compile : flacJNI <= format.c

[arm64-v8a] Compile : flacJNI <= stream_encoder_framing.c

[arm64-v8a] Compile : flacJNI <= stream_encoder_intrin_avx2.c

[arm64-v8a] Compile : flacJNI <= stream_encoder_intrin_sse2.c

[arm64-v8a] Compile : flacJNI <= stream_encoder_intrin_ssse3.c

[arm64-v8a] Compile : flacJNI <= window.c

.../Downloads/ExoPlayer/extensions/flac/src/main/jni/flac/src/libFLAC/format.c:47:45: error:

use of undeclared identifier 'VERSION'

FLAC_API const char *FLAC__VERSION_STRING = VERSION;

^

.../Downloads/ExoPlayer/extensions/flac/src/main/jni/flac/src/libFLAC/format.c:49:64: error:

expected ';' after top level declarator

FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION ...

^

;

2 errors generated.

make: *** [/home/philip/Downloads/ExoPlayer/extensions/flac/src/main/obj/local/arm64-v8a/objs/flacJNI/flac/src/libFLAC/format.o] Error 1

make: *** Waiting for unfinished jobs....

How do I get this to work? Thanks.

 类似资料: