diff --git a/src/Couchbase.Lite.Support.Android/Activate.cs b/src/Couchbase.Lite.Support.Android/Activate.cs index 636aa7330..60b628257 100644 --- a/src/Couchbase.Lite.Support.Android/Activate.cs +++ b/src/Couchbase.Lite.Support.Android/Activate.cs @@ -25,6 +25,8 @@ using Couchbase.Lite.Logging; using Couchbase.Lite.Util; +using Microsoft.Extensions.DependencyInjection; + namespace Couchbase.Lite.Support { /// @@ -51,6 +53,10 @@ public static void Activate(Context context) } Service.AutoRegister(typeof(Droid).Assembly); + Service.RegisterServices(container => + { + container.AddSingleton(p => new DefaultDirectoryResolver(context)); + }); } /// diff --git a/src/Couchbase.Lite.Support.Android/Support/DefaultDirectoryResolver.cs b/src/Couchbase.Lite.Support.Android/Support/DefaultDirectoryResolver.cs index bc67858f0..8265aadad 100644 --- a/src/Couchbase.Lite.Support.Android/Support/DefaultDirectoryResolver.cs +++ b/src/Couchbase.Lite.Support.Android/Support/DefaultDirectoryResolver.cs @@ -24,7 +24,6 @@ namespace Couchbase.Lite.Support { - [CouchbaseDependency] internal sealed class DefaultDirectoryResolver : IDefaultDirectoryResolver { private readonly Context _context;