Adding CouchbaseLite


#1

I am trying to add couchbase lite but i got error.i tried it with all versions of couchbase lite like 1.2,1.1,1.0.4 but not able to add couchbaselite successfully.please give me solution for this.

Error:Error:(32, 13) Failed to resolve: com.couchbase.lite:couchbase-lite-android:1.3
Show in File
Show in Project Structure dialog

build.gradle(project:MyApplication)
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()

}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
jcenter()
maven {
url “http://files.couchbase.com/maven2/
}
}
}

Build.gradle(Module:app)

apply plugin: ‘com.android.application’

android {
compileSdkVersion 24
buildToolsVersion “24.0.2”

defaultConfig {
    applicationId "com.example.invjejurka.myapplication"
    minSdkVersion 15
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

// workaround for “duplicate files during packaging of APK” issue
// see https://groups.google.com/d/msg/adt-dev/bl5Rc4Szpzg/wC8cylTWuIEJ
packagingOptions {
exclude 'META-INF/ASL2.0’
exclude 'META-INF/LICENSE’
exclude ‘META-INF/NOTICE’
}
}

dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’])
testCompile 'junit:junit:4.12’
compile 'com.android.support:appcompat-v7:24.2.0’
compile ‘com.couchbase.lite:couchbase-lite-android:1.3’

}


#2

Hi @VidyaJ,
Instead of 1.3, please use 1.3.0?
Thanks!


#3

apply plugin: ‘com.android.application’

android {
compileSdkVersion 22
buildToolsVersion “24.0.2”

defaultConfig {
    applicationId "com.harman.healthdeviceprofilee"
    minSdkVersion 18
    targetSdkVersion 18
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

// workaround for “duplicate files during packaging of APK” issue
// see https://groups.google.com/d/msg/adt-dev/bl5Rc4Szpzg/wC8cylTWuIEJ
packagingOptions {
exclude 'META-INF/ASL2.0’
exclude 'META-INF/LICENSE’
exclude ‘META-INF/NOTICE’
}

}

dependencies {
compile 'com.android.support:support-v4:22.2.1’
compile 'junit:junit:4.12’
compile ‘com.couchbase.lite:couchbase-lite-android:1.3.0’
}
indent preformatted text by 4 spaces
error:
Error:(31, 13) Failed to resolve: com.couchbase.lite:couchbase-lite-android:1.3.0
Show in File
Show in Project Structure dialog


#4

Please post your gradle file and error messages on Stackoverflow.com. This is not CBL related. Thanks!