Skip to content

Android example fails to run: UnsatisfiedLinkError #4103

Closed
@vi

Description

@vi

Bevy version

b6a647c

Operating system & version

Building on Linux x86_64 for Android.

What you did

Followed the https://github.com/bevyengine/bevy/tree/latest/examples#android,
but with cargo apk build --example android, with manual installation of tha apk.

The 215-megabyte "android" application appeared on the device. But upon starting it the window immediately closes.

What you expected to happen

Some Android view with some UI appears

What actually happened

03-04 20:28:08.412  9304  9304 D AndroidRuntime: Shutting down VM
03-04 20:28:08.413  9304  9304 E AndroidRuntime: FATAL EXCEPTION: main
03-04 20:28:08.413  9304  9304 E AndroidRuntime: Process: rust.example.android, PID: 9304
03-04 20:28:08.413  9304  9304 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Unable to load native library "/data/app/~~6E5dAovNIGKNfvRukbcJ_g==/rust.example.android-DAiOvJ6LjHGyMIvo9MQiIw==/lib/arm64/libandroid.so": dlopen failed: cannot locate symbol "__cxa_pure_virtual" referenced by "/data/app/~~6E5dAovNIGKNfvRukbcJ_g==/rust.example.android-DAiOvJ6LjHGyMIvo9MQiIw==/lib/arm64/libandroid.so"...
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.NativeActivity.onCreate(NativeActivity.java:178)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8000)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7984)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:223)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7660)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
03-04 20:28:08.413  9304  9304 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Additional information

Running on Pixel 3 XL with Android 11.

rustc 1.60.0-nightly (0c292c966 2022-02-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorC-StartupA crash that occurs when first attempting to run a Bevy appO-AndroidSpecific to the Android mobile operating systemP-CrashA sudden unexpected crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions