{"record":{"id":"655a95022ae5e2ca","repo":"tauri-apps/tauri","slug":"skipping-android-studio-command-line-tools-install","errorCode":null,"errorMessage":"Skipping Android Studio command line tools installation. Please go through the manual setup process described in the documentation: https://tauri.app/start/prerequisites/#android","messagePattern":"Skipping Android Studio command line tools installation\\. Please go through the manual setup process described in the documentation: https://tauri\\.app/start/prerequisites/#android","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/mobile/android/mod.rs","lineNumber":550,"sourceCode":"      } else {\n        std::env::current_dir().context(\"failed to get current directory\")?\n      };\n\n      let sdk_manager_path = extract_path\n        .join(\"cmdline-tools/bin/sdkmanager\")\n        .with_extension(if cfg!(windows) { \"bat\" } else { \"\" });\n\n      let mut granted_permission_to_install = false;\n\n      if !sdk_manager_path.exists() {\n        granted_permission_to_install = crate::helpers::prompts::confirm(\n          \"Do you want to install the Android Studio command line tools to setup the Android SDK?\",\n          Some(false),\n        )\n        .unwrap_or_default();\n\n        if !granted_permission_to_install {\n          crate::error::bail!(\"Skipping Android Studio command line tools installation. Please go through the manual setup process described in the documentation: https://tauri.app/start/prerequisites/#android\");\n        }\n\n        download_cmdline_tools(&extract_path)?;\n      }\n\n      if !granted_permission_to_install {\n        granted_permission_to_install = crate::helpers::prompts::confirm(\n          \"Do you want to install the Android SDK using the command line tools?\",\n          Some(false),\n        )\n        .unwrap_or_default();\n\n        if !granted_permission_to_install {\n          crate::error::bail!(\"Skipping Android Studio SDK installation. Please go through the manual setup process described in the documentation: https://tauri.app/start/prerequisites/#android\");\n        }\n      }\n\n      log::info!(\"Running sdkmanager to install platform-tools, android-{SDK_VERSION} and ndk-{NDK_VERSION} on {}...\", default_android_home.display());","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/mobile/android/mod.rs#L532-L568","documentation":"While setting up the Android SDK, if `cmdline-tools/bin/sdkmanager` is missing, the CLI interactively asks permission to download the Android Studio command line tools. This error means the prompt was declined (default answer is No, and a non-TTY stdin makes unwrap_or_default() return false), so setup aborts and points you to the manual prerequisite documentation.","triggerScenarios":"`tauri android init`/`dev`/`build` on a machine whose SDK lacks cmdline-tools, with the confirm prompt answered 'n' — or run in a context without a TTY where the prompt defaults to No.","commonSituations":"Developers who want to control toolchain installs manually; CI pipelines that accidentally reach the interactive branch; SDKs installed only through Android Studio's GUI (which does not always place cmdline-tools).","solutions":["Rerun the command and answer 'y' to 'Do you want to install the Android Studio command line tools...?'","Manually install cmdline-tools: download the zip from developer.android.com, unzip to $ANDROID_HOME/cmdline-tools/latest, then rerun","Install cmdline-tools via Android Studio > SDK Manager > SDK Tools > 'Android SDK Command-line Tools'","Set ANDROID_HOME to an SDK that already contains cmdline-tools/bin/sdkmanager"],"exampleFix":"# before\n$ tauri android dev\n? Do you want to install the Android Studio command line tools...? No\nerror: Skipping Android Studio command line tools installation...\n# after\n$ tauri android dev\n? Do you want to install the Android Studio command line tools...? Yes\n# or manual: place sdkmanager at $ANDROID_HOME/cmdline-tools/bin/sdkmanager","handlingStrategy":"fallback","validationCode":"# skip the prompt entirely by pre-providing the tool:\ntest -x \"$ANDROID_HOME/cmdline-tools/bin/sdkmanager\" || \\\n  echo 'cmdline-tools missing - tauri will prompt; install them first'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-install cmdline-tools (unzip to $ANDROID_HOME/cmdline-tools/latest) before first `tauri android` run","Answer 'y' to bootstrap prompts or avoid non-TTY contexts when you want the automatic setup","Script the SDK bootstrap once, cache it, and stop hitting the prompt"],"tags":["android","sdk","cli-prompt","cmdline-tools","setup"],"backgroundTag":"android-sdk-manual-setup-required","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}