Skip to content

Duplicate symbols when linking Android on Rust 1.60 #415

@YuhanLiin

Description

@YuhanLiin

When building multiple crates that export Android APIs via flapigen, the final linking step fails with the error: ld error: duplicate symbol: JNI_OnLoad. This only happens on Rust 1.60 and not older versions. This is caused because of rust-lang/rust#83822, which removes support for duplicate symbols on Android targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidOnly Android related issuesJava/JNICase specific only for Java/JNI interface generationmay be bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions