{"record":{"id":"bf20c567600d7e83","repo":"tauri-apps/tauri","slug":"target-not-found","errorCode":null,"errorMessage":"Target not found","messagePattern":"Target not found","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/mobile/android/run.rs","lineNumber":99,"sourceCode":"  let dirs = crate::helpers::app_paths::resolve_dirs();\n  let mut tauri_config = crate::helpers::config::get_config(\n    tauri_utils::platform::Target::Android,\n    &options\n      .config\n      .iter()\n      .map(|conf| &conf.0)\n      .collect::<Vec<_>>(),\n    dirs.tauri,\n  )?;\n  let mut built_application = super::build::run(\n    super::build::Options {\n      debug: !options.release,\n      targets: device.as_ref().map(|d| {\n        vec![Target::all()\n          .iter()\n          .find(|(_key, t)| t.arch == d.target().arch)\n          .map(|(key, _t)| key.to_string())\n          .expect(\"Target not found\")]\n      }),\n      features: options.features,\n      config: options.config.clone(),\n      split_per_abi: true,\n      apk: false,\n      aab: false,\n      skip_bundle: true,\n      open: options.open,\n      ci: false,\n      args: options.args,\n      ignore_version_mismatches: options.ignore_version_mismatches,\n      target_device: device.as_ref().map(|d| TargetDevice {\n        id: d.serial_no().to_string(),\n        name: d.name().to_string(),\n      }),\n    },\n    noise_level,\n    &dirs,","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/mobile/android/run.rs#L81-L117","documentation":"`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.","triggerScenarios":"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).","commonSituations":"Exotic/preview Android hardware attached during development; emulator images for new architectures; adb defaulting to the wrong device when several are connected.","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."],"exampleFix":"# before: riscv64 device selected -> panics 'Target not found'\n$ adb devices -l\nemulator-5554 device ... device:generic_riscv64\n$ tauri android dev\n\n# after: launch a supported system image\n$ emulator -avd Pixel_8_API_34   # x86_64/arm64 image\n$ tauri android dev","handlingStrategy":"type-guard","validationCode":"# Before `tauri android dev`, verify the selected device ABI is supported\nSUPPORTED=\"arm64-v8a armeabi-v7a x86 x86_64\"\nABI=\"$(adb -s \"$DEVICE_SERIAL\" shell getprop ro.product.cpu.abi | tr -d '\\r')\"\necho \"$SUPPORTED\" | grep -qw \"$ABI\" || { echo \"unsupported ABI: $ABI\"; exit 1; }","typeGuard":"function isSupportedAndroidAbi(abi: string): boolean {\n  const SUPPORTED = new Set([\"arm64-v8a\", \"armeabi-v7a\", \"x86\", \"x86_64\"]);\n  return SUPPORTED.has(abi);\n}\n// usage: const prop = execSync(`adb -s ${serial} shell getprop ro.product.cpu.abi`).toString().trim();\n// if (!isSupportedAndroidAbi(prop)) skipDevice(serial);","tryCatchPattern":null,"preventionTips":["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."],"tags":["android","mobile","abi","device","tauri-cli"],"backgroundTag":"unsupported-target-arch","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}