Installing Couchbase Lite on Android

    +

    Create or open an existing Android Studio project and install Couchbase Lite using the following method.

    Make the following additions to the module-level build.gradle file (typically in the app folder).

    • Community

    • Enterprise

    1. Include the following in the android {} section:

      android {
          // Required only if your project has some Kotlin source code
          kotlinOptions { jvmTarget = '1.8' }
      
          // Set minimum JVM level to ensure availability of, for example, lambda expressions
          compileOptions {
              targetCompatibility 1.8
              sourceCompatibility 1.8
          }
      
      //   ... other section content as required by user
      }
    2. Include the following in the dependencies{} section:

      dependencies {
          implementation "com.couchbase.lite:couchbase-lite-android:${version}"
      
      //   ... other section content as required by user
      }
    1. Include the following in the android {} section:

      android {
          // Required only if your project has some Kotlin source code
          kotlinOptions { jvmTarget = '1.8' }
      
          // Set minimum JVM level to ensure availability of, for example, lambda expressions
          compileOptions {
              targetCompatibility 1.8
              sourceCompatibility 1.8
          }
      
      //   ... other section content as required by user
      }
    2. Include the following in the dependencies{} section:

      dependencies {
          implementation "com.couchbase.lite:couchbase-lite-android-ee:${version}"
      
      //   ... other section content as required by user
      }
    3. Include the following in the repositories {} section:

      repositories {
          maven { url 'https://mobile.maven.couchbase.com/maven2/dev/' }
          google()
          jcenter()
      
      //   ... other section content as required by user
      }