Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/tauri-cli/src/mobile/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,20 @@ fn ensure_sdk(non_interactive: bool) -> Result<()> {
}

fn ensure_ndk(non_interactive: bool) -> Result<()> {

// Return Ok if NDK_HOME is set by user and its path exists
if let Some(ndk_home) = std::env::var_os("NDK_HOME").map(PathBuf::from) {
if ndk_home.exists() {
log::info!("Using NDK from NDK_HOME: {}", ndk_home.display());
return Ok(());
} else {
crate::error::bail!(
"NDK_HOME is set to {}, but the path does not exist.",
ndk_home.display()
);
}
}

// re-evaluate ANDROID_HOME
let android_home = std::env::var_os("ANDROID_HOME")
.map(PathBuf::from)
Expand Down
Loading