love2d / love-android

Android build setup for LÖVE.
https://love2d.org
Other
209 stars 73 forks source link

AAB immediate crash after launching the application as an internal test on Google Play Console #217

Closed JasonNumberThirteen closed 3 years ago

JasonNumberThirteen commented 3 years ago

Hey, That's me again. Once again I have to face with the problem in Google Play Console. This time is more seriously, though. I have uploaded an internal test of my application. I was able to download, install and launch. However, when I launch my app, it "blinks" and closes immediately! When I looked at report details (ANR errors), it has shown me this stack trace, six times in a row!

FATAL EXCEPTION: SDLActivity Process: [my application], PID: XXXXX java.lang.NoSuchMethodError: no static or non-static method "Lorg/libsdl/app/SDLControllerManager;.nativeAddJoystick(ILjava/lang/String;Ljava/lang/String;IIZIIII)I" at java.lang.Runtime.nativeLoad(Native Method) at java.lang.Runtime.loadLibrary0(Runtime.java:1014) at java.lang.System.loadLibrary(System.java:1669) at org.libsdl.app.e.c(Unknown Source:106) at org.libsdl.app.SDLActivity.loadLibraries(Unknown Source:10) at org.libsdl.app.SDLActivity.onCreate(Unknown Source:91) at org.love2d.android.GameActivity.onCreate(Unknown Source:67) at android.app.Activity.performCreate(Activity.java:7144) at android.app.Activity.performCreate(Activity.java:7135) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

What's going on?!

MikuAuahDark commented 3 years ago

There can be only 2 things that can happen, which is my best guess:

  1. Somehow there are no libraries shipped.
  2. SDLControllerActivity name gets obfuscated

Can you try to add this to app/proguard-rules.pro?

-keep class org.libsdl.app.** { *; }

If that doesn't work then I probably need the APK that Play Store generated (for example pulling the APK from device).

JasonNumberThirteen commented 3 years ago

-keep class org.libsdl.app.** { *; } helped. BIG THANKS!