SdkLocator class

Deprecated: thin wrapper over ResolvedToolchain (ADR-0013, T1).

Tool resolution is now a data-driven, printable policy — see AndroidToolchain (the ordered candidate sources) and ResolvedToolchain (the artifact injected into steps via PipelineState). All find* methods delegate with identical semantics; this wrapper exists only until the remaining call sites outside the pipeline migrate. New code must inject ResolvedToolchain.

Inheritance

Constructors

SdkLocator({String? androidSdkPath, String? flutterSdkPath, bool verbose = false, ArtifactStore? store})

Properties

hashCode → int
The hash code for this object.
no setterinherited
policy → AndroidToolchain
The underlying policy value (for doctor / tests that want raw resolution without provisioning).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
verbose → bool
Whether progress details should be printed.
finalinherited

Methods

describe(ToolQuery query) → List<ToolSource>
The policy for query as a value: ordered candidate sources, most preferred first.
inherited
describePolicyLines({List<String> tools = defaultDoctorTools}) → Future<List<String>>
One doctor line per tool: ✅ aapt2 → path (source) or ❌ tool: not found + tried candidates + fix. Human- and agent-readable.
inherited
findAapt2() → Future<String>
Locate aapt2. Throws ToolchainException on failure.
inherited
findAdb() → Future<String>
Locate adb. Throws ToolchainException on failure.
inherited
findAndroidSdk() → Future<String>
Find Android SDK path. Throws ToolchainException on failure.
inherited
findAndroidXAnnotations() → Future<String>
Locate AndroidX annotation JAR (store-provisioned).
inherited
findAndroidXLifecycle() → Future<String>
Locate AndroidX lifecycle-common JAR (store-provisioned).
inherited
findAndroidXLifecycleRuntime() → Future<String>
Locate AndroidX lifecycle-runtime JAR (store-provisioned).
inherited
findApksigner() → Future<String>
Locate apksigner. Throws ToolchainException on failure.
inherited
findD8() → Future<String>
Locate d8. Throws ToolchainException on failure.
inherited
findFlutterJar() → Future<String>
Locate Flutter embedding JAR. Throws ToolchainException on failure.
inherited
findFlutterSdk() → Future<String>
Find Flutter SDK path. Throws ToolchainException on failure.
inherited
findJavac() → Future<String>
Locate javac. Throws ToolchainException on failure.
inherited
findKotlinc() → Future<String?>
Locate kotlinc (optional: null when not installed).
inherited
findKotlinStdlib() → Future<String?>
Find Kotlin standard library JAR (optional: null when unavailable).
inherited
findR8() → Future<String?>
Locate r8 (optional: null when not installed).
inherited
findZipalign() → Future<String>
Locate zipalign. Throws ToolchainException on failure.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remediationFor(String tool) → String
Remediation hint for tool (doctor output, error messages).
inherited
require(ToolQuery query) → Future<ResolvedTool>
Resolve a required tool or throw ToolchainException naming the fix.
inherited
resolve(ToolQuery query) → Future<ToolResolution>
Evaluate the policy for query, returning both the result and the candidates tried (for errors and oka doctor output).
inherited
resolveJavaForKotlin(BuildContext ctx) → Future<Map<String, String>?>
Resolve Java environment for Kotlin compilation
inherited
toString() → String
A string representation of this object.
inherited
validatePackagingTools() → Future<Map<String, String>>
Tools required to package an APK (no device install).
inherited
validateTools({bool requireAdb = false}) → Future<Map<String, String>>
Validate tools for doctor / full environment checks.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited