Skip to content

Adding Project Dependencies

Add one or more of the SDK for Android components as required for your mobile application. The SDK includes the following libraries:

Library Gradle Dependency Line
Fiori com.sap.cloud.android:fiori:2.0.0
Foundation com.sap.cloud.android:foundation:2.0.0
OData com.sap.cloud.android:odata:2.0.0
Offline OData com.sap.cloud.android:offline-odata:2.0.0
Onboarding com.sap.cloud.android:onboarding:2.0.0
Google Vision com.sap.cloud.android:google-vision:2.0.0

Warning

The Offline OData libraries currently don't support 64 bit. The following should be added to your module-level build.gradle to avoid linking issues with other libraries that include 64 bit like SQLCipher.

1
2
3
4
5
6
7
8
android {
    defaultConfig {
        ndk {
            // Exclude 64 bit libraries.
            abiFilters "armeabi-v7a", "x86"
        }
    }
}

Procedure

Add the following SDK libraries as dependencies to your module-level build.gradle file:

1
2
3
4
5
6
7
8
dependencies { 
    implementation 'com.sap.cloud.android:fiori:2.0.0'
    implementation 'com.sap.cloud.android:foundation:2.0.0'
    implementation 'com.sap.cloud.android:odata:2.0.0'
    implementation 'com.sap.cloud.android:offline-odata:2.0.0'
    implementation 'com.sap.cloud.android:onboarding:2.0.0'
    implementation 'com.sap.cloud.android:google-vision:2.0.0'
}
If you intend to enable logging, include logback-android dependencies to this enclosure:

1
2
3
4
dependencies { 
    ...
    implementation 'com.github.tony19:logback-android:1.1.1-13'
}

Using these libraries will require Multidex. To enable this for your project, add the following to the defaultConfig section of your module-level build.gradle file:

1
2
3
4
5
6
7
android {
    defaultConfig {
        ...
        multiDexEnabled true
    }
    ...
}
Update the target SDK version and compatability versions as follows to your module-level build.gradle file:

1
2
3
4
5
6
7
8
android {
    compileSdkVersion 28
    ...
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}