androidkinvey

Setting Up Kinvey in Android Studio


Does anybody use Kinvey as a Back End Service? I followed these steps to set it up: http://devcenter.kinvey.com/android/guides/getting-started

When I add Kinvey to my dependencies in my gradle file, I get a syntax error that states: Failed to resolve:kinvey-android-*:

Here is my build.gradle(Module:app) file:

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

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

dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'

compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name:'kinvey-android-*', ext:'aar')}

Here is a screenshot:

enter image description here

Does anybody know why? Thank you.


Solution

  • I faced the same issue and just found out how to fix it.

    1. Go to yourprojectfolder/app/libs

    2. Check the name of the kinvey library. In my case it is kinvey-android-2.10.5

    3. Add this to your build.gradle file

        dependencies {
            compile fileTree(dir: 'libs', include: ['*.jar'])
    
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.1.1'
        compile 'com.android.support:design:23.1.1'
        compile(name:'kinvey-android-2.10.5', ext:'jar')
        }