{"record":{"id":"652f38d3f564c26b","repo":"dotnet/maui","slug":"no-applinks-implementation-was-found-if-in-androi","errorCode":null,"errorMessage":"No AppLinks implementation was found, if in Android make sure you installed the Microsoft.Maui.Controls.AppLinks","messagePattern":"No AppLinks implementation was found, if in Android make sure you installed the Microsoft\\.Maui\\.Controls\\.AppLinks","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Controls/src/Core/Application/Application.cs","lineNumber":83,"sourceCode":"\t\t/// <summary>\n\t\t/// Terminates the application.\n\t\t/// </summary>\n\t\tpublic void Quit()\n\t\t{\n\t\t\tHandler?.Invoke(ApplicationHandler.TerminateCommandKey);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets the <see cref=\"IAppLinks\"/> for deep linking and app indexing.\n\t\t/// </summary>\n\t\tpublic IAppLinks AppLinks\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tif (_appIndexProvider == null)\n\t\t\t\t\tthrow new ArgumentException(\"No IAppIndexingProvider was provided\");\n\t\t\t\tif (_appIndexProvider.AppLinks == null)\n\t\t\t\t\tthrow new ArgumentException(\"No AppLinks implementation was found, if in Android make sure you installed the Microsoft.Maui.Controls.AppLinks\");\n\t\t\t\treturn _appIndexProvider.AppLinks;\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Sets the current application instance.\n\t\t/// </summary>\n\t\t[EditorBrowsable(EditorBrowsableState.Never)]\n\t\tpublic static void SetCurrentApplication(Application value) => Current = value;\n\n\t\t/// <summary>\n\t\t/// Gets or sets the current application instance.\n\t\t/// </summary>\n\t\tpublic static Application? Current { get; set; }\n\n\t\tPage? _singleWindowMainPage;\n\n\t\t/// <summary>","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/src/Controls/src/Core/Application/Application.cs#L65-L101","documentation":"Thrown by the Application.AppLinks getter when an IAppIndexingProvider IS registered but its AppLinks property returns null. The provider exists yet has no IAppLinks implementation behind it, which on Android typically means the AppLinks platform package is not installed.","triggerScenarios":"Reading Application.AppLinks where _appIndexProvider != null but _appIndexProvider.AppLinks == null, hitting the second ArgumentException with the Android-specific hint.","commonSituations":"Android project missing the Microsoft.Maui.Controls.AppLinks NuGet package; provider registered from a shared project but the Android implementation assembly not loaded; partial deep-link setup where the registration exists but the backing type was stripped.","solutions":["On Android, add the Microsoft.Maui.Controls.AppLinks NuGet package to the Android head project.","Ensure the platform AppLinks implementation is not trimmed/AOT-removed in release builds (add a linker preserve if needed).","Confirm the registered IAppIndexingProvider actually returns a non-null IAppLinks for the current platform."],"exampleFix":"<!-- before: Android head project has no AppLinks package -->\n<!-- after: add to the Android .csproj -->\n<PackageReference Include=\"Microsoft.Maui.Controls.AppLinks\" Version=\"$(MauiVersion)\" />","handlingStrategy":"try-catch","validationCode":"// Verify the platform AppLinks package is referenced on Android.\n// <PackageReference Include=\"Microsoft.Maui.Controls.AppLinks\" .../>","typeGuard":null,"tryCatchPattern":"try { var links = Application.Current.AppLinks; }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"AppLinks implementation\"))\n{ /* install Microsoft.Maui.Controls.AppLinks on Android */ }","preventionTips":["Add Microsoft.Maui.Controls.AppLinks to the Android head project from the start when using deep links.","Preserve the AppLinks implementation from trimming/linking in release builds.","Verify the registered provider returns a non-null IAppLinks on every target platform."],"tags":["application","app-links","android","missing-package"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}