DioxusLabs / DioxusLabs/dioxus
Windows: # Android build fails with WRY_ANDROID_KOTLIN_FILES_OUT_DIR canonicalization error
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
# Android build fails with WRY_ANDROID_KOTLIN_FILES_OUT_DIR canonicalization error
**Problem**
When building a Dioxus project for Android using `dx build --platform android`, the build fails with a panic in the `wry` crate's build script. The error occurs during the canonicalization of the `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` path. Additionally, the generated APK file fails to install on physical Android devices with "app is not installed" error.
**Steps To Reproduce**
Steps to reproduce the behavior:
1. Set up Dioxus project with Android dependencies
2. Run `dx build --platform android` or `dx build --platform android --release`
3. Build fails with wry canonicalization error
4. If APK is generated, attempt to install `app-debug.apk` on physical Android device
5. Installation fails with "app is not installed" message
**Expected behavior**
- The build should complete successfully without panics
- Generated APK should install and run properly on Android devices
**Error Output**
```
121.248s WARN error: failed to run custom build command for `wry v0.52.1`
121.250s WARN Caused by:
121.251s WARN process didn't exit successfully: `D:\Rust\dioxus\server\target\android-dev\build\wry-cdfb1c753a2c3cfe\build-script-build` (exit code: 101)
121.253s WARN thread 'main' panicked at C:\Users\romas\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wry-0.52.1\build.rs:31:11:
121.253s WARN Failed to canonicalize `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` path D:\Rust\dioxus\server\target\dx\server\debug\android\app\app\src\main\kotlin\dev\dioxus\main
```
**Environment:**
dx doctor
Setup
Web: wasm-bindgen, wasm-opt, and TailwindCSS are downloaded automatically
iOS: Install iOS SDK and developer tools and through XCode
Android: Install Android Studio, NDK, and then set ANDROID_HOME and ANDROID_NDK_HOME
macOS: all tools should be installed by default
Windows: install the webview2 binary
Linux: Install libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
nix: Make sure all tools are in your path (codesign, ld, etc.)
Rust
Rustc version: rustc 1.89.0 (29483883e 2025-08-04)
Rustc sysroot: C:\Users\romas\.rustup\toolchains\stable-x86_64-pc-windows-msvc
Rustc path: C:\Users\romas\.cargo\bin\rustc.exe
Cargo path: C:\Users\romas\.cargo\bin\cargo.exe
cc path: not found
Devtools
VSCode Extension: C:\Users\romas\.vscode\extensions\dioxuslabs.dioxus-0.6.0
Cursor Extension: C:\Users\romas\.cursor\extensions\dioxuslabs.dioxus-0.6.0
TailwindCSS: C:\Users\romas\.dx\tailwind/tailwindcss-v4.1.5.exe
Web
wasm-opt: not installed
wasm-bindgen: C:\Users\romas\.dx\wasm-bindgen/wasm-bindgen-0.2.100.exe
wasm-bindgen version: 0.2.100
iOS/macOS
XCode: not found
Simulator: not found
Security CLI: not found
Codesign CII: not found
xcode-select: not found
xcrun: not found
ranlib: C:\Program Files\LLVM\bin\llvm-ranlib.exe
Android
sdk: C:\Users\romas\AppData\Local\Android\Sdk
ndk: C:\Users\romas\AppData\Local\Android\Sdk\ndk\25.2.9519653
adb: C:\Users\romas\AppData\Local\Android\Sdk\platform-tools\adb.exe
emulator: not found
java_home: C:\Program Files\Android\Android Studio\jbr
Toolchains
✅ wasm32-unknown-unknown (web)
✅ aarch64-android-linux (android)
✅ i686-linux-android (android)
✅ armv7-linux-androideabi (android)
✅ x86_64-android-linux (android)
❌ x86_64-apple-ios (iOS)
❌ aarch64-apple-ios (iOS)
❌ aarch64-apple-ios-sim (iOS)
❌ aarch64-apple-darwin (iOS)
**Additional Context**
- All Android toolchains are properly installed (✅ aarch64-android-linux, i686-linux-android, armv7-linux-androideabi, x86_64-android-linux)
- ANDROID_HOME and ANDROID_NDK_HOME are set correctly
- The error occurs in both debug and release builds
- The path that fails canonicalization appears to be: `D:\Rust\dioxus\server\target\dx\server\debug\android\app\app\src\main\kotlin\dev\dioxus\main`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.