tauri-apps/tauri · error
Target not found
Error message
Target not found
What it means
`tauri android dev`/`run` with a connected device maps the device's reported ABI to one of the known Android Rust targets from cargo-mobile2's Target::all() (aarch64/armv7/x86/x86_64 triples). This expect fires when the connected device or emulator reports an architecture that is not in that list, so no build target can be selected for it.
Solutions
- List connected devices and their ABIs: `adb devices -l`, then `adb -s <serial> shell getprop ro.product.cpu.abi`.
- Disconnect or ignore the unsupported device; use a standard ABI device or emulator (arm64-v8a, armeabi-v7a, x86, x86_64 system images).
- If multiple devices are attached, select a supported one explicitly instead of letting the CLI auto-pick.
- If you genuinely need the ABI, open a feature request against tauri / cargo-mobile2 for the new target.
Example fix
# before: riscv64 device selected -> panics 'Target not found' $ adb devices -l emulator-5554 device ... device:generic_riscv64 $ tauri android dev # after: launch a supported system image $ emulator -avd Pixel_8_API_34 # x86_64/arm64 image $ tauri android dev
Defensive patterns
Strategy: type-guard
Validate before calling
# Before `tauri android dev`, verify the selected device ABI is supported
SUPPORTED="arm64-v8a armeabi-v7a x86 x86_64"
ABI="$(adb -s "$DEVICE_SERIAL" shell getprop ro.product.cpu.abi | tr -d '\r')"
echo "$SUPPORTED" | grep -qw "$ABI" || { echo "unsupported ABI: $ABI"; exit 1; } Type guard
function isSupportedAndroidAbi(abi: string): boolean {
const SUPPORTED = new Set(["arm64-v8a", "armeabi-v7a", "x86", "x86_64"]);
return SUPPORTED.has(abi);
}
// usage: const prop = execSync(`adb -s ${serial} shell getprop ro.product.cpu.abi`).toString().trim();
// if (!isSupportedAndroidAbi(prop)) skipDevice(serial); Prevention
- Filter connected devices by ABI in automation before invoking tauri android dev/run.
- Standardize emulator system images on x86_64 or arm64-v8a in CI matrices.
- Check `adb devices -l` when several devices are attached so the CLI doesn't auto-pick an exotic one.
When it happens
Trigger: Running `tauri android dev` while a device whose ABI is outside aarch64-linux-android / armv7-linux-androideabi / i686-linux-android / x86_64-linux-android is the selected target (e.g. an emerging riscv64 Android board, or a misreporting emulator image).
Common situations: Exotic/preview Android hardware attached during development; emulator images for new architectures; adb defaulting to the wrong device when several are connected.
Related errors
- failed to read missing addr file
- No external IP detected.
- project directory doesn't exist. Please run `tauri init`…
- Android folder already exists
- Android SDK not found. Make sure the SDK and NDK are…
AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20).
Data as JSON: /api/errors/bf20c567600d7e83.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-cli/src/mobile/android/run.rs:99
let dirs = crate::helpers::app_paths::resolve_dirs();
let mut tauri_config = crate::helpers::config::get_config(
tauri_utils::platform::Target::Android,
&options
.config
.iter()
.map(|conf| &conf.0)
.collect::<Vec<_>>(),
dirs.tauri,
)?;
let mut built_application = super::build::run(
super::build::Options {
debug: !options.release,
targets: device.as_ref().map(|d| {
vec![Target::all()
.iter()
.find(|(_key, t)| t.arch == d.target().arch)
.map(|(key, _t)| key.to_string())
.expect("Target not found")]
}),
features: options.features,
config: options.config.clone(),
split_per_abi: true,
apk: false,
aab: false,
skip_bundle: true,
open: options.open,
ci: false,
args: options.args,
ignore_version_mismatches: options.ignore_version_mismatches,
target_device: device.as_ref().map(|d| TargetDevice {
id: d.serial_no().to_string(),
name: d.name().to_string(),
}),
},
noise_level,
&dirs,View on GitHub (pinned to 52e4b6e71d)