Android App Keeps Stopping

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
comradesparklepony
Prole
Posts: 11
Joined: Mon Dec 30, 2019 6:57 pm

Android App Keeps Stopping

Post by comradesparklepony »

Hello,

I have an LOVE android app which I am moving to love 11.4. Everything compiles fine, but when I try to run it, it appears to stop instantly, and I get the notification "<app name> keeps stopping". I've tried clearing the app cache, and cleaning and rebuilding the project, but the issue persists. I tried attaching a debugger, but the app stops before the debugger can do anything. Any ideas?

Thank you!
~sporkl
comradesparklepony
Prole
Posts: 11
Joined: Mon Dec 30, 2019 6:57 pm

Re: Android App Keeps Stopping

Post by comradesparklepony »

Couple updates:

If I rebuild the project, I get the following error:

Code: Select all

[CXX1405] error when building with ndkBuild using /Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/src/jni/Android.mk: Build command failed.
Error while executing process /Users/dv/Library/Android/sdk/ndk/21.3.6528147/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/src/jni/Android.mk NDK_APPLICATION_MK=/Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/src/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/build/intermediates/cxx/Debug/3t4p1s1a/obj NDK_LIBS_OUT=/Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/build/intermediates/cxx/Debug/3t4p1s1a/lib -j16 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

fcntl(): Bad file descriptor
make: python: Command not found
make: python: Command not found
make: python: Command not found
/Volumes/FILES/,proj/,old/2020/metrodrone/love-android/love/src/jni/Android.mk:7: *** Missing LOVE. Make sure to initialize the submodule correctly!.  Stop.
But the submodule does appear to be present. When I run

Code: Select all

git pull --recurse-submodules
it says that I am up to date, and I did make sure to clone the submodules correctly when first downloading. I'm not sure why I was not getting this error before.

Thank you!
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Android App Keeps Stopping

Post by Andlac028 »

It seems like you do not have Python installed (so Python script is not able to run and thus is not able to detect love)...

Install Python (or if you have python3 installed, alias it to python)
comradesparklepony
Prole
Posts: 11
Joined: Mon Dec 30, 2019 6:57 pm

Re: Android App Keeps Stopping

Post by comradesparklepony »

I did have python3 installed, but not aliased to python. For some reason aliasing didn't work, probably because I'm using Android Studio, but manually changing the makefile to use python3 instead did. So thank you for catching that!

That said, I still am getting the issue with the app stopping. I did find a different tab in Android Studio with some debug information:

Code: Select all

E/.love2d.androi: No implementation found for void org.love2d.android.GameActivity.nativeSetDefaultStreamValues(int, int) (tried Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues and Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues__II)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: SDLActivity
    Process: org.love2d.android, PID: 16044
    java.lang.UnsatisfiedLinkError: No implementation found for void org.love2d.android.GameActivity.nativeSetDefaultStreamValues(int, int) (tried Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues and Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues__II)
        at org.love2d.android.GameActivity.nativeSetDefaultStreamValues(Native Method)
        at org.love2d.android.GameActivity.onCreate(GameActivity.java:124)
        at android.app.Activity.performCreate(Activity.java:8000)
        at android.app.Activity.performCreate(Activity.java:7984)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
W/System: A resource failed to call close.
Thank you!
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Android App Keeps Stopping

Post by Andlac028 »

I found same error reported in the issue tracker and there seems to be some patch and solution
See https://github.com/love2d/love-android/issues/208
comradesparklepony
Prole
Posts: 11
Joined: Mon Dec 30, 2019 6:57 pm

Re: Android App Keeps Stopping

Post by comradesparklepony »

Thanks for the link, good find! Yep, looks like running it with an x86_64 emulator instead of an x86 emulator fixed it. Thank you!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 42 guests