Couchbase-Lite-Android is a lightweight embedded NoSQL database engine for Android with the built-in ability to sync to Couchbase Server on the backend.
It is the Android port of Couchbase Lite iOS.
Couchbase Lite databases are able to sync with eachother via Sync Gateway backed by Couchbase Server
-
Download and run the GrocerySync demo application
-
Create your own Hello World Couchbase Lite via the Getting Started guide.
Maven repo URL: http://files.couchbase.com/maven2/
<dependency>
<groupId>com.couchbase.lite</groupId>
<artifactId>android</artifactId>
<version>0.0.0-272</version>
</dependency>
To get the latest build number (eg, the "272" part of the version above), see Jenkins CI builds
To see an example gradle configuration, see GrocerySync's build.gradle file
Maven repo URL: http://files.couchbase.com/maven2/
<dependency>
<groupId>com.couchbase.cblite</groupId>
<artifactId>CBLite</artifactId>
<version>1.0.0-beta2</version>
</dependency>
For Eclipse and Phonegap users, here are links to the zip file which includes the jars:
- Master Branch build #272 zipfile - to get more recent builds, see Jenkins CI builds
- Beta2 zipfile
-
-
If you are using the beta2 release or stable branch of Couchbase Lite, use the latest version in the stable channel (currently Android Studio 0.3.X)
-
If you are using the master branch of Couchbase Lite, use the latest version in the canary channel (currently Android Studio 0.4.3)
-
-
Under Tools / Android / Android SDK Manager and install "Extras/Google Repository" and "Extras/Android Support Repository" (future versions of Android Studio may make this step unnecessary)
Note recent versions after Android Studio 0.4.3 are not able to import the project due to Issue #65915, so it's recommended to use Android Studio 0.4.3.
Use Git to clone the Couchbase Lite repository to your local disk:
$ git clone git://github.com/couchbase/couchbase-lite-android.git
cd couchbase-lite-android
$ git submodule init && git submodule update
cp local.properties.example local.properties
- Customize
local.properties
according to your SDK installation directory
You should be able to import the project directly into Android Studio:
- Start Android Studio
- Choose File / Import and choose the couchbase-lite-android/CouchbaseLiteProject directory screenshot
- Choose Import from External Model and make sure Gradle is selected screenshot
- Check the auto-import and the Use gradle wrapper (recommended) checkboxes screenshot
- Hit Finish and wait for all tasks to finish (may take a while)
After it's finished with the import, it should look like this
There are two wiki pages which describe how to run the tests:
-
Running the Test Suite wiki page.
- TodoLite
- GrocerySync
- LiteServAndroid
- CouchChatAndroid -- just a stub at this point.
- Project Structure wiki page that describes the new project structure.
- A mailing list post describing the project structre
- Android 2.3 Gingerbread (API level 9) and above.
- Apache License 2.0