Couchbase.Lite.Support.Android 4.0.2

Prefix Reserved
dotnet add package Couchbase.Lite.Support.Android --version 4.0.2
                    
NuGet\Install-Package Couchbase.Lite.Support.Android -Version 4.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Couchbase.Lite.Support.Android" Version="4.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Couchbase.Lite.Support.Android" Version="4.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Couchbase.Lite.Support.Android" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Couchbase.Lite.Support.Android --version 4.0.2
                    
#r "nuget: Couchbase.Lite.Support.Android, 4.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Couchbase.Lite.Support.Android@4.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Couchbase.Lite.Support.Android&version=4.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Couchbase.Lite.Support.Android&version=4.0.2
                    
Install as a Cake Tool

Couchbase Lite .NET

Couchbase Lite is a lightweight embedded NoSQL database that has built-in sync to larger backend structures, such as Couchbase Server.

This is the source repo of Couchbase Lite C#. The main supported platforms are .NET 6 Desktop (Linux will run anywhere, but is most tested on Ubuntu), .NET 8 iOS, .NET 8 Android, .NET 8 Mac Catalyst, .NET 8 WinUI, Xamarin iOS, and Xamarin Android.

Documentation Overview

Getting Started

The following starter code demonstrates the basic concepts of the library:


using System;
using Couchbase.Lite;
using Couchbase.Lite.Query;
using Couchbase.Lite.Sync;

// Get the database (and create it if it doesn't exist)
var database = new Database("mydb");
var collection = database.GetDefaultCollection();

// Create a new document (i.e. a record) in the database
var id = default(string);
using var createdDoc = new MutableDocument();
createdDoc.SetFloat("version", 2.0f)
    .SetString("type", "SDK");

// Save it to the database
collection.Save(createdDoc);
id = createdDoc.Id;

// Update a document
using var doc = collection.GetDocument(id);
using var mutableDoc = doc.ToMutable();
createdDoc.SetString("language", "C#");
collection.Save(createdDoc);

using var docAgain = collection.GetDocument(id);
Console.WriteLine($"Document ID :: {docAgain.Id}");
Console.WriteLine($"Learning {docAgain.GetString("language")}");


// Create a query to fetch documents of type SDK
// i.e. SELECT * FROM database WHERE type = "SDK"
using var query = QueryBuilder.Select(SelectResult.All())
    .From(DataSource.Collection(collection))
    .Where(Expression.Property("type").EqualTo(Expression.String("SDK")));

// Alternatively, using SQL++, with _ referring to the database
using var sqlppQuery = collection.CreateQuery("SELECT * FROM _ WHERE type = 'SDK'");

// Run the query
var result = query.Execute();
Console.WriteLine($"Number of rows :: {result.AllResults().Count}");

// Create replicator to push and pull changes to and from the cloud
var targetEndpoint = new URLEndpoint(new Uri("ws://localhost:4984/getting-started-db"));
var replConfig = new ReplicatorConfiguration(targetEndpoint);
replConfig.AddCollection(database.GetDefaultCollection());

// Add authentication
replConfig.Authenticator = new BasicAuthenticator("john", "pass");

// Create replicator
var replicator = new Replicator(replConfig);
replicator.AddChangeListener((sender, args) =>
{
    if (args.Status.Error != null) {
        Console.WriteLine($"Error :: {args.Status.Error}");
    }
});

replicator.Start();

// Later, stop and dispose the replicator *before* closing/disposing the database
Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net10.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Couchbase.Lite.Support.Android:

Package Downloads
Couchbase.Lite

A lightweight, document-oriented (NoSQL), syncable database engine for .NET

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.2 391 12/17/2025
4.0.0 229 11/24/2025
3.2.4 4,158 6/12/2025
3.2.3 718 4/30/2025
3.2.2 278 3/14/2025
3.2.1 5,373 11/13/2024
3.2.0 2,043 8/30/2024
3.2.0-beta.2 218 5/16/2024
3.1.10 861 11/25/2024
3.1.9 368 8/9/2024
3.1.7 2,051 5/1/2024
3.1.6 1,654 3/6/2024
3.1.3 51,968 11/16/2023
3.1.1 15,653 7/18/2023
3.1.0 2,554 4/27/2023
3.0.15 244 11/6/2023
3.0.12 16,313 6/26/2023
3.0.8 1,385 2/8/2023
3.0.2 1,210 8/2/2022
3.0.0 27,463 2/22/2022
Loading failed