Skip to main content

Android SDK migration guide

FlowX.AI 6.0 moves the Android SDK to compileSdk 37, Android Gradle plugin 9 and Kotlin 2.4, and aligns the SDK’s names with the iOS and web SDKs. Update your build setup first, then the renamed SDK APIs.

System requirements

System requirements:
  • minSdk = 26 (unchanged)
  • compileSdk = 37
The SDK library was built using: Your container app must build with at least:
  • Android Gradle Plugin 9.1.0
  • Gradle 9.3.1 (the minimum depends on your Android Gradle Plugin version)
  • Kotlin 2.4
  • JDK 17

Library dependencies

The SDK now depends on OkHttp 5 and Retrofit 3. Gradle resolves your app to these versions even if you declare OkHttp 4 or Retrofit 2, so update any code in your app that uses APIs removed in these major versions.
Align your app’s versions of these libraries with the SDK’s versions to avoid compatibility issues.

Migration steps

To build and run your container app with the 6.0 SDK, follow these steps in order:
1

Update the SDK version

[rootProject]/app/build.gradle.kts
Find the SDK version that matches your platform version in Release Notes → v6.0 → Deployment guidelines → Component versions.
2

Increase the compileSdk version to 37

[rootProject]/app/build.gradle.kts
The SDK and its AndroidX, OkHttp and Coil dependencies require compileSdk 37. Raising targetSdk is not required.
3

Update the Android Gradle plugin version to at least 9.1.0

[rootProject]/build.gradle.kts
Android Gradle plugin 9 is a major release with breaking build changes. Consult the Android Gradle plugin 9.0 release notes.
4

Update the Gradle version

[rootProject]/gradle/wrapper/gradle-wrapper.properties
Android Gradle plugin 9.1 requires at least Gradle 9.3.1, and 9.5 requires at least Gradle 9.6.0. Check the minimum for your version in the Android Gradle plugin release notes.
5

Remove the Kotlin Android plugin

Android Gradle plugin 9 compiles Kotlin by itself (built-in Kotlin), so the org.jetbrains.kotlin.android plugin must be removed:
[rootProject]/build.gradle.kts
[rootProject]/app/build.gradle.kts
Consult the Migrate to built-in Kotlin guide.
6

Update the Kotlin version to at least 2.4

With built-in Kotlin, your app compiles with the version of the Kotlin Gradle plugins you declare, such as the Compose Compiler plugin. The Kotlin version that Android Gradle plugin uses by default is too old to read the SDK’s classes.
[rootProject]/build.gradle.kts
With an older Kotlin version, the build fails with an error like: The binary version of its metadata is 2.4.0, expected version is 2.2.0.
Use the same version for every Kotlin Gradle plugin your project declares (for example, Parcelize or Serialization).
7

Make sure core library desugaring is enabled

The SDK requires core library desugaring. If your app does not enable it yet, add:
[rootProject]/app/build.gradle.kts
8

Rename the imageBaseUrl and customHeaders properties of the Config interface

imageBaseUrl is now assetsBaseUrl, and customHeaders is now additionalHttpHeaders:
[rootProject]/app/src/main/[java|kotlin]/com/example/MyApp.kt
The default value of the locale property changed from Locale.getDefault() to Locale.forLanguageTag("en-US"). If your app relies on the device locale for date, number and currency formatting, set it explicitly:
9

Stop passing null to the setAccessToken method

The setAccessToken method no longer accepts null:
Remove the calls that clear the token (for example, on logout or after a failed login):
Passing an empty string ("") no longer clears the token. The SDK sends it as is and the backend rejects the requests.
A token can’t be cleared once set. When another user logs in, set that user’s token. If no token is ever set, the SDK runs in anonymous mode. For details, see the Authentication section of the Android SDK reference.
10

Rename the closeModalFunc parameter to onDismissRequested

The parameter of the startProcess and continueProcess methods was renamed. Its lambda now runs in the ProjectScope context:
Replace the deprecated CloseModalProcessScope type with ProjectScope, as described in the Replace deprecated APIs section.
11

Rename the imageBaseUrl parameter of the changeEnvironment method (if used)

Replace deprecated APIs

The following 5.9 names still compile in 6.0, but they are deprecated and will be removed in the next LTS release. Replace them now:
Android Studio offers a Replace with quick fix on every deprecated call.
These changes are reflected in an actual implementation as shown below:

Android SDK reference

Android renderer SDK documentation

Migration overview

Full 5.9.x → 6.0.0 container app upgrade guide
Last modified on October 30, 2026