Skip to content

Conversation

DomanskiFilip
Copy link

Description

Fixes Android build error on Windows when using nvm4w Node.js installations.

Problem

When using nvm4w on Windows, cargo tauri android dev fails with:

  • "Cannot find module" errors
  • "node.exe.cmd" not found errors

Solution

  • Improved Windows executable detection in BuildTask.kt template
  • Added fallback logic: .cmd → .bat → cargo.exe → cargo
  • Maintains compatibility with existing setups

Testing

  • Generated BuildTask.kt contains fallback logic
  • Template properly handles cargo vs node executables
  • Needs contributors with full Android SDK to test build

Fixes #13892

Notes

  • Clippy passes with no warnings
  • One ACL snapshot test fails on Windows (unrelated to this change) this appears to be a platform-specific test issue. No ACL code was modified in this PR

- Fix Android build error on Windows when using nvm4w
- Add robust fallback logic for Windows executable detection
- Prevent 'node.exe.cmd' and 'Cannot find module' errors
- Graceful fallback to cargo when Node.js detection fails

Fixes tauri-apps#13892
@DomanskiFilip DomanskiFilip requested a review from a team as a code owner September 3, 2025 20:37
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬Proposal
1 participant