Расширение Flac для Exoplayer - PullRequest
0 голосов
/ 19 марта 2019

Я пытаюсь скомпилировать расширения flac для использования с Android Studio, ExoPlayer в моем проекте.Я попытался следовать инструкциям в ExoPlayer README, однако, я получаю следующую ошибку:

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....

Как мне заставить это работать?Спасибо.

1 Ответ

0 голосов
/ 23 марта 2019

Чтобы получить расширения flac для компиляции в Android Studio, мне нужно было перейти по адресу:

Инструменты | SDKManager | SDK инструменты и проверено Cmake

...