Android crash on startup

I tried to run my game on my android device but it crashed on startup.
I use LY 1.22 and tested on devices with android 5 and android 6.

10-02 00:33:55.216 21002-21002/com.lumberyard.yourgame E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.lumberyard.yourgame, PID: 21002
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lumberyard.yourgame/com.lumberyard.yourgame.test1Activity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.lumberyard.yourgame-1/lib/arm64/libtest1Launcher.so
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
    at android.app.ActivityThread.access$900(ActivityThread.java:153)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5451)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 Caused by: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.lumberyard.yourgame-1/lib/arm64/libtest1Launcher.so
    at android.app.NativeActivity.onCreate(NativeActivity.java:182)
    at com.amazon.lumberyard.LumberyardActivity.onCreate(LumberyardActivity.java:231)
    at android.app.Activity.performCreate(Activity.java:6323)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) 
    at android.app.ActivityThread.access$900(ActivityThread.java:153) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:148) 
    at android.app.ActivityThread.main(ActivityThread.java:5451) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

it seems that it cant load /data/app/com.lumberyard.yourgame-1/lib/arm64/libtest1Launcher.so

the libtest1Launcher.so library exist on the apk file , but the path is /lib/arm64-v8a/libtest1Launcher.so not /lib/arm64/libtest1Launcher.so.
but i’m not sure the problem is really this.

Hi @aimar, this might be fixed in a more recent version of Lumberyard - the current version is 1.25

problem exist even in LY 1.26
my test case is so simple . create a new project and deploy to my device.
i tested on android 5 and android 6.
is there any one who tested LY on android 6 ?

Hey @aimar, we’re following up with our mobile dev experts and will try to get back to you soon!

Hi @aimar
Sorry to hear you’re having problems running on Android. We do indeed test on all our supported platforms before releasing. The reason I suspect you are having problems is that we support Android 28 and up.
The Google Play Store only accepts apps built with API’s that are a year old which is why we deprecated support for the older API’s (please see this article: https://developer.android.com/distribute/best-practices/develop/target-sdk). You can, however, make an Android 5 (i.e. API-21) compatible app by setting the NDK_PLATFORM to the version you want in dev/WAF/android/android_settings.json:

{
    "DEV_KEYSTORE_ALIAS" : "development_keystore",
    "DEV_KEYSTORE" : "_WAF_/android/dev.keystore",

    "DISTRO_KEYSTORE_ALIAS" : "distribution_keystore",
    "DISTRO_KEYSTORE" : "_WAF_/android/distro.keystore",

    "BUILD_TOOLS_VER" : "latest",

    "SDK_VERSION" : "android-29",
    "NDK_PLATFORM" : "android-21",

    "BUILD_ENVIRONMENT" : "Development"
}

Give that a try and let me know how you get on.

i tried by setting NDK_PLATFORM to android-21 (this is default value) and android-23 and different NDK versions (r16, r20 , r21) and the problem still exist.

The reason I suspect you are having problems is that we support Android 28 and up

i’m not an android developer (so it’s possible i be wrong), but in android studio project minSdkVersion set to 21, so i thought there is no problem to run lumberyard on earlier versions of android.(5 and up)