Couchbase Lite Framework Version


#1

Which version of Couchbase Lite is the latest stable, recommended version of the framework?

The tutorials in the Develop > Training section use 1.0.2. The downloads section has version 1.0.3. However, the maven repository contains higher versions (1.0.3-1.0.4)

When I try to update the app-dependencies file to use 1.0.3 (compile ‘com.couchbase.lite:couchbase-lite-android:1.0.3’, compile ‘com.couchbase.lite:couchbase-lite-java-listener:1.0.3’), I get the compilation error:
Could not resolve all dependencies for configuration ‘:app:_debugCompile’.
Could not find couchbase-lite-java-listener.libraries:couchbase-lite-java-core:unspecified.

When I try to upgrade the same dependencies to 1.0.4, the compiling works out fine, but when the app runs, I get the error:
Cannot parse version code

Can you please advise on which is the recommended version to use?


#2

Sorry for the mess. The recommended version is 1.0.4, however we only have maven artifacts at this point (no zip file available)

I’m not sure why you’d be getting that error. Can you outline steps you are doing, and post your build.gradle files to a github gist and put the link here?


#3

No problem - following are the steps I am undertaking:

  1. I followed the steps to set up an Android project (http://developer.couchbase.com/mobile/develop/training/build-first-android-app/get-started-studio/index.html)
    1.1 Add the url to the maven repository in build.gradle file at project level:
    maven { url “http://files.couchbase.com/maven2/” }
    1.2 Add the packagingOptions in build.gradle file at app level:
    packagingOptions {
    exclude 'META-INF/ASL2.0’
    exclude 'META-INF/LICENSE’
    exclude ‘META-INF/NOTICE’ }
    1.3 Add the following to the top-level dependencies in build.gradle file at app level:
    compile 'com.couchbase.lite:couchbase-lite-android:1.0.4’
    compile ‘com.couchbase.lite:couchbase-lite-java-listener:1.0.4’;
  2. Sync the project with the gradle files - no error
  3. Run the app and get the following error:
    02-13 17:32:55.450 1620-1620/couchbase.examples.com.couchbasemobile E/CBLite﹕ Cannot parse version code:

The link to the build.gradle files are:

Thank you for your assistance.


#4

@SF15 With couchbase lite android 1.0.4 I get the same error message “Cannot parse version code:”

02-14 14:03:58.715    3107-3107/android.jamiltz.com.replicationfilter E/CBLite﹕ Cannot parse version code:
02-14 14:03:58.716    3107-3107/android.jamiltz.com.replicationfilter E/CBLite﹕ Cannot parse version code:

It’s not throwing an exception or crashing so I believe you can develop against 1.0.4, everything is working fine for me. It may be something to do with the package manifest.


#5

Hi @traun

It seems VERSION_CODE is not numeric value, actually it could be empty string according to the log message . Where is build script for CBL Android/Java? We should check it.

private static final String VERSION_CODE="${VERSION_CODE}";  // replaced during build process
...
...
try {
   Integer.parseInt(VERSION_CODE);
} catch (NumberFormatException e) {
   Log.e(Log.TAG, "Cannot parse version code: %s", VERSION_CODE);
}

#6

Hi Guys, i have the same Problem. can you help me? My build.gradle file: build.gradle.zip (3.4 KB)

Error:A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_debugCompile’.
Could not find com.couchbase.lite:couchbase-lite-android:1.1.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.pom
https://repo1.maven.org/maven2/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.jar
file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.pom
file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.jar
file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.pom
file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/couchbase/lite/couchbase-lite-android/1.1.0/couchbase-lite-android-1.1.0.jar
Required by:
:android:unspecified > android:CordovaLib:unspecified


#7

Hi @philinheaven,

Currently we posted CBL Android/Java on our custom maven repository.
Please use http://files.couchbase.com/maven2/ as maven repository.

How to set up custom maven repository for Android Studio

Hope this information helps you!

P.S. We are working for posting CBL jar files on maven central from next release (post 1.1.x release)

Thanks,
Hideki