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:3.0.0
Fiori Maps Esri com.sap.cloud.android:esri-maps:3.0.0
Fiori Maps Google com.sap.cloud.android:google-maps:3.0.0
Foundation com.sap.cloud.android:foundation:3.0.0
OData com.sap.cloud.android:odata:3.0.0
Offline OData com.sap.cloud.android:offline-odata:3.0.0
Onboarding com.sap.cloud.android:onboarding:3.0.0
OnboardingFlows WelcomeScreen com.sap.cloud.android:onboardingflows-welcomescreen:3.0.0
OnboardingFlows BasicAuth com.sap.cloud.android:onboardingflows-basicauth:3.0.0
OnboardingFlows OAuth com.sap.cloud.android:onboardingflows-oauth:3.0.0
OnboardingFlows SAML com.sap.cloud.android:onboardingflows-saml:3.0.0
OnboardingFlows OTP com.sap.cloud.android:onboardingflows-otp:3.0.0
OnboardingFlows StoreManager com.sap.cloud.android:onboardingflows-storemanager:3.0.0
OnboardingFlows Logging com.sap.cloud.android:onboardingflows-logging:3.0.0
OnboardingFlows EULA com.sap.cloud.android:onboardingflows-eula:3.0.0
Google Vision com.sap.cloud.android:google-vision:3.0.0

Procedure

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
dependencies { 
    implementation 'com.sap.cloud.android:fiori:3.0.0'
    implementation 'com.sap.cloud.android:esri-maps:3.0.0'
    implementation 'com.sap.cloud.android:google-maps:3.0.0'
    implementation 'com.sap.cloud.android:foundation:3.0.0'
    implementation 'com.sap.cloud.android:odata:3.0.0'
    implementation 'com.sap.cloud.android:offline-odata:3.0.0'
    implementation 'com.sap.cloud.android:onboarding:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-welcomescreen:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-basicauth:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-oauth:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-saml:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-otp:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-storemanager:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-logging:3.0.0'
    implementation 'com.sap.cloud.android:onboardingflows-eula:3.0.0' 
    implementation 'com.sap.cloud.android:google-vision:3.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:2.0.0'
}

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
    }
}

Warning

Please note that the Foundation component disables backups by default for security reasons, whereas new Android apps enable it, which may lead to manifest merger errors. You may override the SDK default setting by adding the tools:replace="android:allowBackup" flag to the application tag. Please refer to How to enable and disable backup for implications and alternative ways to address the issue.