gluonhq / substrate

Create native Java(FX) apps for desktop, mobile and embedded
GNU General Public License v2.0
395 stars 51 forks source link

Apk crash on Android 6 device #850

Open alcorrius opened 3 years ago

alcorrius commented 3 years ago

Gluon-sample HelloFX built with GraalVM 20.3.0 (or latest 21.0.0-dev-20201204_0332), client-maven-plugin 0.1.35 working fine on Android version 8 and 9 but crashes on Sony Xperia M4 (E2312) (Android 6.0.1, API level 23, ART 2.1.0, aarch64).

Fatal exception: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "getgrgid_r" referenced by "/data/app/com.gluonhq.samples.hellofx-1/lib/arm64/libsubstrate.so"

mvn client:run -Pandroid :


[Wed Dec 09 12:34:57 EET 2020][INFO] [SUB] --------- beginning of main
[Wed Dec 09 12:34:57 EET 2020][INFO] [SUB] --------- beginning of system
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onCreate start, using Android Logging v1
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onCreate done
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onStart
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onStart done
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onResume
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): onResume done
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): surfaceCreated for com.gluonhq.helloandroid.MainActivity@9070f56
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] V/GraalActivity(13931): loading substrate library
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] --------- beginning of crash
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931): FATAL EXCEPTION: main
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931): Process: com.gluonhq.samples.hellofx, PID: 13931
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "getgrgid_r" referenced by "/data/app/com.gluonhq.samples.hellofx-1/lib/arm64/libsubstrate.so"...
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at java.lang.Runtime.loadLibrary(Runtime.java:372)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at java.lang.System.loadLibrary(System.java:1076)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at com.gluonhq.helloandroid.MainActivity.surfaceCreated(MainActivity.java:104)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.SurfaceView.updateWindow(SurfaceView.java:597)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:179)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2055)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.Choreographer.doCallbacks(Choreographer.java:670)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.Choreographer.doFrame(Choreographer.java:606)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.os.Handler.handleCallback(Handler.java:739)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.os.Handler.dispatchMessage(Handler.java:95)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.os.Looper.loop(Looper.java:148)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at android.app.ActivityThread.main(ActivityThread.java:5517)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at java.lang.reflect.Method.invoke(Native Method)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] E/AndroidRuntime(13931):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[Wed Dec 09 12:35:03 EET 2020][INFO] [SUB] W/ActivityManager( 1567):   Force finishing activity com.gluonhq.samples.hellofx/com.gluonhq.helloandroid.MainActivity
[Wed Dec 09 12:35:04 EET 2020][INFO] [SUB] W/ActivityManager( 1567): Activity pause timeout for ActivityRecord{5c56e10 u0 com.gluonhq.samples.hellofx/com.gluonhq.helloandroid.MainActivity t64 f}
[Wed Dec 09 12:35:14 EET 2020][INFO] [SUB] W/ActivityManager( 1567): Activity destroy timeout for ActivityRecord{5c56e10 u0 com.gluonhq.samples.hellofx/com.gluonhq.helloandroid.MainActivity t64 f}```
dfaure-kdab commented 2 years ago

This exact error message about "getgrgid_r" happens when running an app that requires Android 7 (API level 24) on an Android 6 (API level 23) device (for the record, if anyone else ends up here after encountering this error message and googling for it).