[Solved] Can't build Android apk

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

[Solved] Can't build Android apk

Post by xNick1 »

My Love game used to build on my old laptop, but I lost it and now I can't build the game anymore.
I have SDK API28, NDK, Java8, I setup the paths and everything I needed to do (at least I think so).
I'm using the 0.11.x branch on Martin-Felis's repo, I put the game.love file in the assets folder etc.
It used to build but now it gives me an error.
I don't really know what to do to make it build again

Code: Select all

nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ ./gradlew build
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :love:externalNativeBuildDebug 
Build love armeabi-v7a
[armeabi-v7a] Compile thumb  : openal <= base.c
[armeabi-v7a] Compile thumb  : openal <= loopback.c
[armeabi-v7a] Compile thumb  : openal <= null.c
[armeabi-v7a] Compile thumb  : openal <= opensl.c
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
static declaration of 'log2f' follows non-static declaration                    ^                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
static inline float log2f(float f)
                    ^
float         log2f(float);float         log2f(float);
              ^
              ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
static inline float log2f(float f)
                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
11 error generated.
1 error generated.
 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
1 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':love:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /home/nick/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Android.mk NDK_APPLICATION_MK=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/lib -j4 /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/liblove.so}
  [armeabi-v7a] Compile thumb  : openal <= base.c
  [armeabi-v7a] Compile thumb  : openal <= loopback.c
  [armeabi-v7a] Compile thumb  : openal <= null.c
  [armeabi-v7a] Compile thumb  : openal <= opensl.c
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
  :
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
  
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
  
  static declaration of 'log2f' follows non-static declaration                    ^                    ^
  
  
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
  
  static inline float log2f(float f)
                      ^
  float         log2f(float);float         log2f(float);
  
                ^
                ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
  static inline float log2f(float f)
                      ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  11 error generated.
  1 error generated.
   error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
  make: *** Waiting for unfinished jobs....
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
  1 error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
38 actionable tasks: 1 executed, 37 up-to-date
nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ 
Last edited by xNick1 on Sat Apr 13, 2019 9:50 am, edited 1 time in total.
ShanePierce
Prole
Posts: 7
Joined: Sun Sep 16, 2018 4:26 pm

Re: Can't build Android apk

Post by ShanePierce »

xNick1 wrote: Sun Mar 24, 2019 9:43 am My Love game used to build on my old laptop, but I lost it and now I can't build the game anymore.
I have SDK API28, NDK, Java8, I setup the paths and everything I needed to do (at least I think so).
I'm using the 0.11.x branch on Martin-Felis's repo, I put the game.love file in the assets folder etc.
It used to build but now it gives me an error.
I don't really know what to do to make it build again

Code: Select all

nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ ./gradlew build
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :love:externalNativeBuildDebug 
Build love armeabi-v7a
[armeabi-v7a] Compile thumb  : openal <= base.c
[armeabi-v7a] Compile thumb  : openal <= loopback.c
[armeabi-v7a] Compile thumb  : openal <= null.c
[armeabi-v7a] Compile thumb  : openal <= opensl.c
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
static declaration of 'log2f' follows non-static declaration                    ^                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
static inline float log2f(float f)
                    ^
float         log2f(float);float         log2f(float);
              ^
              ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
static inline float log2f(float f)
                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
11 error generated.
1 error generated.
 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
1 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':love:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /home/nick/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Android.mk NDK_APPLICATION_MK=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/lib -j4 /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/liblove.so}
  [armeabi-v7a] Compile thumb  : openal <= base.c
  [armeabi-v7a] Compile thumb  : openal <= loopback.c
  [armeabi-v7a] Compile thumb  : openal <= null.c
  [armeabi-v7a] Compile thumb  : openal <= opensl.c
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
  :
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
  
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
  
  static declaration of 'log2f' follows non-static declaration                    ^                    ^
  
  
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
  
  static inline float log2f(float f)
                      ^
  float         log2f(float);float         log2f(float);
  
                ^
                ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
  static inline float log2f(float f)
                      ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  11 error generated.
  1 error generated.
   error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
  make: *** Waiting for unfinished jobs....
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
  1 error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
38 actionable tasks: 1 executed, 37 up-to-date
nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ 
I am also facing the same. Need immediate help.

Thanks in advance.
Regards,
Shane
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Can't build Android apk

Post by xNick1 »

ShanePierce wrote: Thu Mar 28, 2019 6:04 pm
xNick1 wrote: Sun Mar 24, 2019 9:43 am My Love game used to build on my old laptop, but I lost it and now I can't build the game anymore.
I have SDK API28, NDK, Java8, I setup the paths and everything I needed to do (at least I think so).
I'm using the 0.11.x branch on Martin-Felis's repo, I put the game.love file in the assets folder etc.
It used to build but now it gives me an error.
I don't really know what to do to make it build again

Code: Select all

nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ ./gradlew build
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :love:externalNativeBuildDebug 
Build love armeabi-v7a
[armeabi-v7a] Compile thumb  : openal <= base.c
[armeabi-v7a] Compile thumb  : openal <= loopback.c
[armeabi-v7a] Compile thumb  : openal <= null.c
[armeabi-v7a] Compile thumb  : openal <= opensl.c
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
:
In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
static declaration of 'log2f' follows non-static declaration                    ^                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
static inline float log2f(float f)
                    ^
float         log2f(float);float         log2f(float);
              ^
              ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
static inline float log2f(float f)
                    ^
/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
float         log2f(float);
              ^
11 error generated.
1 error generated.
 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
1 error generated.
make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':love:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /home/nick/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Android.mk NDK_APPLICATION_MK=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/lib -j4 /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/liblove.so}
  [armeabi-v7a] Compile thumb  : openal <= base.c
  [armeabi-v7a] Compile thumb  : openal <= loopback.c
  [armeabi-v7a] Compile thumb  : openal <= null.c
  [armeabi-v7a] Compile thumb  : openal <= opensl.c
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/null.c/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/base.c::297:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h::1515:
  :
  In file included from In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h::66:
  :
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h::2626::2121::  errorerror: : static declaration of 'log2f' follows non-static declarationstatic declaration of 'log2f' follows non-static declaration
  
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/opensl.c:28:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: errorstatic inline float log2f(float f)static inline float log2f(float f): 
  
  static declaration of 'log2f' follows non-static declaration                    ^                    ^
  
  
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h::3838::1515::  notenote: : previous declaration is hereprevious declaration is here
  
  static inline float log2f(float f)
                      ^
  float         log2f(float);float         log2f(float);
  
                ^
                ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/Alc/backends/loopback.c:26:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alu.h:15:
  In file included from /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/OpenAL32/Include/alFilter.h:6:
  /home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/src/jni/openal-soft-1.18.2/common/math_defs.h:26:21: error: static declaration of 'log2f' follows non-static declaration
  static inline float log2f(float f)
                      ^
  /home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15: note: previous declaration is here
  float         log2f(float);
                ^
  11 error generated.
  1 error generated.
   error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/base.o] Error 1
  make: *** Waiting for unfinished jobs....
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/loopback.o] Error 1
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/null.o] Error 1
  1 error generated.
  make: *** [/home/nick/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x/love/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/openal/Alc/backends/opensl.o] Error 1


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
38 actionable tasks: 1 executed, 37 up-to-date
nick@debian:~/Downloads/Nick/Progetti/Love/LoveAndroidBuild/0.11.x$ 
I am also facing the same. Need immediate help.

Thanks in advance.
Regards,
Shane

I rebuilt my environment in the same way as before, but probably I used to build with an older NDK version while I have a newer version now (I downloaded the lastest one both then and now).
I'll be in Milan this weekend, so I can't try to fix it.
Could you try to download a slightly older version of the NDK, put it into the NDK folder and trying to build it?

It seems like the problem has to do with NDK:

Code: Select all

/home/nick/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/math.h:38:15:
Let me know please :awesome:
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: [Solved] Can't build Android apk

Post by xNick1 »

I managed to solve the problem by downloading an older NDK (16b) and by clearing the old binaries it built.
I kept getting the same errors because of the old binaries it built with NDK 19
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests