Android SDK migration guide
FlowX.AI 6.0 moves the Android SDK tocompileSdk 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
- Android Gradle Plugin 9.5.0
- Gradle 9.8.2
- Kotlin 2.4.21
- 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
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
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
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
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 Remove the calls that clear the token (for example, on logout or after a failed login):
setAccessToken method no longer accepts null: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: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:
These changes are reflected in an actual implementation as shown below:
Related resources
Android SDK reference
Android renderer SDK documentation
Migration overview
Full 5.9.x → 6.0.0 container app upgrade guide

