Skip to content

Android build fails due to duplicate symbols (start_app) for Dioxus template #441

@czarop

Description

@czarop

Hi,

I have initiated the template app with dioxus for the front end. When i build for ios, no probs. When i build for android i get a linker error seemingly due to the ffi fn 'start_app' clashing with a fn with the same name as part of dioxus launch process. I am unsure as to why this isn't an issue on ios... or if this something I'm doing wrong? Any hints appreciated!
I am building for android on a Windows system... although one thing to note was my successful build for ios was performed on a mac system... i haven't currently tested building for android on a mac, but will update if that works when i get a chance to do that test.
I built simply with 'cargo android build'

= note: ld.lld: error: duplicate symbol: start_app␍
>>> defined at lib.rs:54 (src\lib/lib.rs:54)␍
>>> C:\Users\ts286220\Documents\rust\mobile_test\target\aarch64-linux-android\debug\deps\mobile_test.693bwtemwm68zbn4smxiqgq1u.rcgu.o:(start_app)␍
>>> defined at lib.rs:109 (src/lib.rs:109)␍
>>> dioxus_mobile-9a2493ea720cf900.dioxus_mobile.e7c67f304d5edf1f-cgu.0.rcgu.o:(.text.start_app+0x0) in archive C:\Users\ts286220\Documents\rust\mobile_test\target\aarch64-linux-android\debug\deps\libdioxus_mobile-9a2493ea720cf900.rlib␍
clang: error: linker command failed with exit code 1 (use -v to see invocation)␍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions