Skip to content

Troubleshooting

Overview of common issues.

Gradle Building May Fail on Upgrading to SAP BTP SDK for Android to Release 26.11.0

bom Artifact Not Found

Problem: After adding com.sap.cloud.android:bom to the project, the build fails with a "Could not find" or "Module ... not found" error.

Fix: The artifact is published only from SAP BTP SDK for Android 26.11.0 onwards. Verify that:

  1. The SDK version declared in gradle/libs.versions.toml (or equivalent) is 26.11.0 or later.
  2. Ensure the repository is correctly configured. App developers should use the SAP Cloud Shipment channel; SAP SDK component teams must use the internal Artifactory. See Migrating an Existing Project to the SDK BOM for the correct repository URLs and credential setup.

A Pinned Third-Party Version Is Silently Ignored or Overrides the BOM

Problem: After importing com.sap.cloud.android:bom via platform(), a dependency does not resolve to the version you manually pinned. This happens when your version is ignored (a version lower than the BOM's is discarded) or your version overrides the tested-against one (a version higher than the BOM's overrides it), reintroducing the "highest version wins" divergence the BOM exists to prevent.

Fix: The BOM contributes dependency constraints, while an explicit version on a direct dependency acts as a required version; both take part in Gradle's conflict resolution, where the highest version wins by default. Remove the redundant explicit version and let the BOM supply it. If you need a different version, declare a strict version, which makes your intent explicit and causes Gradle to fail the build rather than resolving quietly. For more information, see Remove Now-Redundant Transitive Versions and the "Intentionally overriding the BOM" note for details.

Unresolved Transitive Dependencies in a Consuming App

Problem: A consuming app builds against an SDK component that uses the BOM, but the app doesn't import the BOM itself. If that component declared the BOM as implementation(platform(...)) instead of api(platform(...)), the BOM constraints are internal to the component and don't propagate to the consumer through Gradle Module Metadata. Any transitive dependency that relied on those constraints to have a version fails to resolve, producing a "Could not resolve" or "No version provided" build error in the consuming app.

Fix: There are two ways to resolve this:

  • In the consuming app: import the BOM directly. This supplies the missing version constraints without requiring any change to the SDK component:

    dependencies {
        implementation(platform("com.sap.cloud.android:bom:<version>"))
        // transitive dependencies now resolve correctly
    }
    
  • In the SDK component: change the BOM import from implementation(platform(...)) to api(platform(...)). This propagates the constraints to all consumers through Gradle Module Metadata so they do not need to import the BOM themselves. Ensure the component publishes its Gradle Module Metadata (<artifact>-<version>.module) alongside the POM; do not disable the GenerateModuleMetadata task, which runs by default with maven-publish.

    For details on fixing the component, see Publishing an SDK Component with the BOM

Gradle Building May Fail on Upgrading to SAP BTP SDK for Android to Release 24.8.0

Problem: When using Jetpack Composed Based UI library in the project, the building may fail on not resolving com.github.jeziellago:compose-markdown:0.5.0.

Fix: Since the Jetpack Composed based Fiori UI library of version 24.8.0 or above depends on a third party MarkDown library which is only published on https://jitpack.io, so the developer will need to add https://jitpack.io in the maven repositories in the build script to meet the dependency.

Buttons Cannot Be Displayed Properly

Problem: When using Fiori screens containing buttons, if buttons cannot be auto-inflated as material buttons (you can check this using the Android Studio Layout Inspector), some attributes will not take effect, for instance, backgroundTint. Buttons will then not be displayed properly.

Fix: <Button> is auto-inflated as <com.google.android.material.button.MaterialButton> via MaterialComponentsViewInflater when using a non-Bridge Theme.MaterialComponents.* theme. Make sure that you apply a non-Bridge Theme.MaterialComponents.* theme (or any theme that inherits a non-Bridge Theme.MaterialComponents.* theme) when trying to import these Fiori screens. Meanwhile, ensure the activity class containing these screens extends androidx.appcompat.app.AppCompatActivity rather than android.app.Activity.

Upgrade SAP BTP SDK for Android to Release 5.0

Problem: Upgrading the version and sdkVersion to 5.0.0 will cause build errors/exceptions.

Workaround: See solution

Request Gets Timeout But Response Is Returned

Problem: Sometimes an HTTP request gets java.net.SocketTimeoutException on the app after sending it, despite mobile services sending back the response correctly. Thus the error is not shown in mobile services logs or network traces.

Workaround: The reason for the timeout exception is, when there are many parallel HTTP requests sent to mobile services, the server may not be able to handle them in time. To solve this, the client code needs to set a large timeout value for read and write operations. See OkHttpClient for additional information on timeouts.

OkHttpClient okHttpClient = new OkHttpClient.Builder()
        .addInterceptor(...)
        .connectTimeout(60, TimeUnit.SECONDS)
        .readTimeout(60, TimeUnit.SECONDS)
        .writeTimeout(60, TimeUnit.SECONDS)
        .build();
ClientProvider.set(okHttpClient);

Upgrade H2 Database

Problem: H2 database 1.4.199 or earlier versions have critical vulnerabilities, but after upgrading the database to 1.4.200, opening the database generated with previous versions is problematic. Users cannot use the connection accounts feature without the correct version of the H2 database.

Fix: upgrade the existing H2 database to 1.4.200 if the application encounters issues (because the existing database is version 1.4.199 or lower). The user will see a message prompting them to run a script to upgrade the H2 database. The script is in the installer file. For Linux: Run upgradeH2Database.sh. For Mac OS: Run upgradeH2Database.sh. For Windows: Run upgradeH2Database.bat.

Failed to Get Metadata From The Configured Destinations

Problem: Sometimes the Wizard fails to download metadata from the configured destinations during application generation.

Workaround: The Wizard will interrupt the application generation process to open a dialog and ask you to upload an OData metadata file from your local file system. At the same time, the following warning message will be displayed when the generated project opens in Android Studio:

Warning

The following Destination(s) might be misconfigured, which can result in a non-working application. Please check the related settings in the SAP mobile service cockpit: [app ID]

Failed to Identify The New Generated Project as Gradle Based Project

Problem: Occasionally, Android Studio fails to identify a newly generated project as a Gradle-based project when the IDE opens it, resulting in an error message: The project is not a Gradle-based project.

Workaround: Manually launch the Build Bundles command to run new build tasks:

  1. Select Build → Build Bundle(s)/APK(s) and click Build Bundle(s).

A View-Based App May Fail to Build Since Android Studio 2024.2.1

Problem: By default, the Gradle JDK in Android Studio 2024.2.x is set to JDK 21.0.x. However, a newly created view-based app should be built with JDK 17. This mismatch results in build issues.

Fix: Locate and change the Gradle JDK setting to JDK 17.0.11-17.0.14. Ensure the java.home variable defined in the config.properties file under the .gradle folder of your project is also set to JDK 17. Afterward, clean your project's cache and try again.

Data Binding Issues During Kotlin 2.x Upgrading for View-Based Apps

Problem: Upgrading a view-based app to Kotlin 2.x may lead to data binding issues:

  1. If you use KAPT as an annotation processor, the proxy classes produced by the OData generator are invisible when Kotlin 2.x is active.
  2. Kotlin's stricter type-casting rules prevent automatic coercion between CharSequence and String. This is no longer allowed when binding object properties to Fiori components.

Fix:

  1. Explicitly pass the generated-proxy directory to KAPT using the android sourceSets block. Update any annotation syntax to comply with the new KAPT requirements.
android {
    ...
    sourceSets {
        main {
            java.srcDirs += ['build/generated/source/odata/googlePlayStoreforGlobalMarket/debug/',
                             'build/generated/source/odata/tencentAppStoreforChinaMarket/debug/']
        }
    }
}
  1. Explicitly convert String objects to CharSequence when binding object properties to Fiori components. For more details, refer to the pull request.

Failed to Transform bcprov-jdk15on-1.70.jar

Problem: If the Gradle plugin version of the application project is lower than 7.0.2, after upgrading to SDK 5.0, the project may report this build error.

Fix: Upgrade the Gradle plugin version of your application project to 7.0.2 or higher.

Workaround: If you cannot upgrade the Gradle plugin version, in the gradle.properties file of your project, add android.jetifier.blacklist=bcprov for Gradle plugin versions lower than 7.0, or add android.jetifier.ignorelist=bcprov for Gradle plugin versions between 7.0 and 7.0.2.

App Crash On Older Android OS Versions Due To "Class Not Found" Error

Problem: On some older versions of Android OS, such as 8.0 and earlier, after upgrading to SDK 4.0 or 5.0, the application may crash randomly due to a Baidu "class not found" error.

Fix: Upgrade the SDK to 4.0.7, 5.0.1, or higher.

Workaround: If you cannot upgrade the SDK version, add the following remove nodes code in the manifest.xml file of your project.

<receiver
    android:name="com.sap.cloud.mobile.foundation.remotenotification.SAPBaiduPushMessageReceiver"
    tools:node="remove" />
<receiver
    android:name="com.baidu.android.pushservice.PushServiceReceiver"
    tools:node="remove" />
<receiver
    android:name="com.baidu.android.pushservice.RegistrationReceiver"
    tools:node="remove"  />
<service
    android:name="com.baidu.android.pushservice.PushService"
    tools:node="remove"  />

Last update: October 8, 2026