DioxusLabs / DioxusLabs/dioxus

Failed to build the template for Android

Open
#5,118 1 comment 0 reactions 0 assignees View on GitHub
bug cli mobile windows
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

Command:

`dx build --package mobile --release --android --target aarch64-linux-android --bundle android`

Output:

```plaintext
......
1.892s INFO Compiled [353/354]: ui
43.844s INFO error: linking with `C:\rust\cargo\bin\dx.exe` failed: exit code: 1
= note: ......
= note: Linker error:
clang: error: no such file or directory: 'c:0hellotargetaarch64-linux-androidandroid-releasedepsmobile-6b128478c67b1015.mobile.62bf982d82811057-cgu.0.rcgu.o'
clang: error: no such file or directory: 'C:rustrustuptoolchainsstable-x86_64-pc-windows-msvclibrustlibaarch64-linux-androidliblibcompiler_builtins-495c6be66f2b8fa6.rlib'

......
ERROR dx build: cargo build finished with errors for target: mobile [aarch64-linux-android]
```

Command:

`sdkmanager --list_installed`

Output:

```plaintext
[=======================================] 100% Fetch remote repository...
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;36.1.0 | 36.1.0 | Android SDK Build-Tools 36.1 | build-tools\36.1.0
ndk;29.0.14206865 | 29.0.14206865 | NDK (Side by side) 29.0.14206865 | ndk\29.0.14206865
platform-tools | 36.0.0 | Android SDK Platform-Tools | platform-tools
platforms;android-36.1 | 1 | Android SDK Platform 36.1 | platforms\android-36.1
```

**Steps To Reproduce**

Steps to reproduce the behavior:

1. `rustup update`
2. `cargo uninstall dioxus-cli`
3. `cargo install dioxus-cli --git "https://github.com/DioxusLabs/dioxus" --branch main`
4. `dx new hello`
5. ```
✔ 🤷 Which sub-template should be expanded? · Workspace
✔ 🤷 Do you want to use Dioxus Fullstack? · false
✔ 🤷 Do you want to use Dioxus Router? · false
✔ 🤷 Do you want to include prompts for LLMs? · false
```
5. `cd hello`
6. `dx build --package mobile --release --android --target aarch64-linux-android --bundle android`

**Expected behavior**

It should give me an APK file.

**Screenshots**

Image

**Environment:**

- Dioxus version: `main` branch
- Rust version: stable 1.92.0 (ded5c06cf 2025-12-08)
- OS info: Windows 10 22H2 x64
- App platform: Android 16

**Questionnaire**

I'm interested in fixing this myself but don't know where to start.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.