When I change the compileSdkVersion to 26 and then build a signed release apk, I get the ‘defopt’ errors again.
Executing tasks: [:app:assembleRelease]
Configuration on demand is an incubating feature.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead.
Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:checkReleaseManifest UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:createReleaseCompatibleScreenManifests UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:splitsDiscoveryTaskRelease UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:javaPreCompileRelease UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:generateJsonModelRelease UP-TO-DATE
:app:externalNativeBuildRelease
Build main x86_64
Android NDK: WARNING: Unsupported source file extensions in /Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/Android.mk for module mpg123
Android NDK: src/libmpg123/icy.h src/libmpg123/icy2utf8.h src/libmpg123/synth.h src/libmpg123/synth_8bit.h src/libmpg123/dither.h
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86_64/libmain.so' is up to date.
Build SDL2_mixer x86_64
Android NDK: WARNING: Unsupported source file extensions in /Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/Android.mk for module mpg123
Android NDK: src/libmpg123/icy.h src/libmpg123/icy2utf8.h src/libmpg123/synth.h src/libmpg123/synth_8bit.h src/libmpg123/dither.h
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86_64/libSDL2_mixer.so' is up to date.
Build SDL2 x86_64
Android NDK: WARNING: Unsupported source file extensions in /Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/Android.mk for module mpg123
Android NDK: src/libmpg123/icy.h src/libmpg123/icy2utf8.h src/libmpg123/synth.h src/libmpg123/synth_8bit.h src/libmpg123/dither.h
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86_64/libSDL2.so' is up to date.
Build mpg123 x86_64
Android NDK: WARNING: Unsupported source file extensions in /Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/Android.mk for module mpg123
Android NDK: src/libmpg123/icy.h src/libmpg123/icy2utf8.h src/libmpg123/synth.h src/libmpg123/synth_8bit.h src/libmpg123/dither.h
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86_64/libmpg123.so' is up to date.
Build main x86
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86/libmain.so' is up to date.
Build SDL2_mixer x86
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86/libSDL2_mixer.so' is up to date.
Build mpg123 x86
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86/libmpg123.so' is up to date.
Build SDL2 x86
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/x86/libSDL2.so' is up to date.
Build main mips64
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips64/libmain.so' is up to date.
Build SDL2_mixer mips64
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips64/libSDL2_mixer.so' is up to date.
Build mpg123 mips64
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips64/libmpg123.so' is up to date.
Build SDL2 mips64
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips64/libSDL2.so' is up to date.
Build mpg123 mips
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips/libmpg123.so' is up to date.
Build SDL2 mips
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips/libSDL2.so' is up to date.
Build main mips
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips/libmain.so' is up to date.
Build SDL2_mixer mips
make: `/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/mips/libSDL2_mixer.so' is up to date.
Build main arm64-v8a
[arm64-v8a] Compile : mpg123 <= optimize.c
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:139:34: error:
use of undeclared identifier 'defopt'; did you mean 'getopt'?
enum optdec defdec(void){ return defopt; }
^~~~~~
getopt
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:513:34: error: use of undeclared identifier 'defopt'; did you mean 'getopt'?
if(!auto_choose && want_dec != defopt)
^~~~~~
getopt
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:513:31: warning: comparison between pointer and integer ('unsigned int' and 'int (*)(int, char *const *, const char *)')
if(!auto_choose && want_dec != defopt)
~~~~~~~~ ^ ~~~~~~
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:515:79: error: use of undeclared identifier 'defopt'; did you mean 'getopt'?
if(NOQUIET) error2("you wanted decoder type %i, I only have %i", want_dec, defopt);
^~~~~~
getopt
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/debug.h:110:97: note: expanded from macro 'error2'
#define error2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b)
^
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:515:79: warning: format specifies type 'int' but the argument has type 'int (*)(int, char *const *, const char *)' [-Wformat]
if(NOQUIET) error2("you wanted decoder type %i, I only have %i", want_dec, defopt);
~~ ^~~~~~
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/debug.h:110:97: note: expanded from macro 'error2'
#define error2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b)
^
2 warnings and 3 errors generated.
make: *** [/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/arm64-v8a/objs/mpg123/src/libmpg123/optimize.o] Error 1
:app:externalNativeBuildRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildRelease'.
> Build command failed.
Error while executing process /Users/James/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/James/Desktop/testSDLmixer/app/jni/Android.mk NDK_APPLICATION_MK=/Users/James/Desktop/testSDLmixer/app/jni/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=0 APP_PLATFORM=android-21 NDK_OUT=/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/lib APP_PLATFORM=android-14 /Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/arm64-v8a/libmain.so}
[arm64-v8a] Compile : mpg123 <= optimize.c
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:139:34: error: use of undeclared identifier 'defopt'; did you mean 'getopt'?
enum optdec defdec(void){ return defopt; }
^~~~~~
getopt
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:513:34: error: use of undeclared identifier 'defopt'; did you mean 'getopt'?
if(!auto_choose && want_dec != defopt)
^~~~~~
getopt
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:513:31: warning: comparison between pointer and integer ('unsigned int' and 'int (*)(int, char *const *, const char *)')
if(!auto_choose && want_dec != defopt)
~~~~~~~~ ^ ~~~~~~
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:515:79: error: use of undeclared identifier 'defopt'; did you mean 'getopt'?
if(NOQUIET) error2("you wanted decoder type %i, I only have %i", want_dec, defopt);
^~~~~~
getopt
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/debug.h:110:97: note: expanded from macro 'error2'
#define error2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b)
^
/Users/James/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/getopt.h:36:6: note: 'getopt' declared here
int getopt(int, char * const [], const char *);
^
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c:515:79: warning: format specifies type 'int' but the argument has type 'int (*)(int, char *const *, const char *)' [-Wformat]
if(NOQUIET) error2("you wanted decoder type %i, I only have %i", want_dec, defopt);
~~ ^~~~~~
/Users/James/Desktop/testSDLmixer/app/jni/SDL_mixer/external/mpg123-1.25.6/src/libmpg123/debug.h:110:97: note: expanded from macro 'error2'
#define error2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b)
^
2 warnings and 3 errors generated.
make: *** [/Users/James/Desktop/testSDLmixer/app/build/intermediates/ndkBuild/release/obj/local/arm64-v8a/objs/mpg123/src/libmpg123/optimize.o] Error 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
16 actionable tasks: 1 executed, 15 up-to-date