The Atlas Device SDK for Kotlin supports the following platforms. Each has its own installation method and requirements:
Requisitos previos
Before getting started, ensure your development environment meets the following prerequisites:
Estudio Android Bumblebee 2021.1.1 or higher.
JDK 11 or higher.
Complemento Kotlin para Android Studio, versión 1.6.10 o superior.
An Android Virtual Device (AVD) using a supported CPU architecture.
For a list of supported target environments, refer to the Supported Target Environments section on this page.
Additionally, Kotlin Multiplatform (KMP) for mobile projects require the following:
Kotlin Multiplatform Mobile (KMM) Plugin for Android Studio, version 0.3.1 or higher.
Una aplicación multiplataforma Kotlin (KMP) creada usando la plantilla "Aplicación multiplataforma Kotlin" en Android Studio. Sigue las instrucciones en la documentación de Kotlin Multiplatform.
Para obtener más detalles sobre cómo configurar tu entorno KMP, consulta la documentación oficial de Kotlin Kotlin Multiplatform para móviles. Para verificar la configuración de tu entorno, sigue la guía de Kotlin para verificar tu entorno.
Tip
Versión del complemento Kotlin
The Kotlin Multiplatform (KMP) ecosystem frequently changes. If you experience any issues installing the SDK, check your Kotlin Plugin version, since outdated plugins can lead to difficult to debug errors. To see which versions of the Kotlin Plugin are compatible with the SDK, refer to the SDK changelog.
Instalación
Tip
Atlas Device SDK and Realm
The SDK uses Realm Core database for device data persistence. When you install the Kotlin SDK, the package names reflect Realm naming.
Add the SDK to the Project
Agrega io.realm.kotlin, especificando la versión de la librería y apply false, a la lista de complementos en el archivo de compilación Gradle a nivel de proyecto, que generalmente se encuentra en <project>/build.gradle:
plugins { id 'io.realm.kotlin' version '1.16.0' apply false }
Add the following to your app-level Gradle build file, typically found at <project>/app/build.gradle:
Add
io.realm.kotlinto the list of plugins.Agregue lo siguiente a la lista de dependencias:
Añade
io.realm.kotlin:library-baseal bloque de dependencias.If using Device Sync in your application, add
io.realm.kotlin:library-syncto the dependencies block.
To use coroutines with the SDK, add
org.jetbrains.kotlinx:kotlinx-coroutines-coreto the list of dependencies.
plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'io.realm.kotlin' } android { // ... build configuration settings } dependencies { implementation 'io.realm.kotlin:library-base:1.16.0' // If using Device Sync implementation 'io.realm.kotlin:library-sync:1.16.0' // If using coroutines with the SDK implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0' }
Add the following to your app-level Gradle build file, typically found at
<project>/app/build.gradle:Add
io.realm.kotlinto the list of plugins.Agregue lo siguiente a la lista de dependencias:
Añade
io.realm.kotlin:library-baseal bloque de dependencias.If using Device Sync in your application, add
io.realm.kotlin:library-syncto the dependencies block.
To use coroutines with the SDK, add
org.jetbrains.kotlinx:kotlinx-coroutines-coreto the list of dependencies.
App build.gradleplugins { kotlin("multiplatform") kotlin("native.cocoapods") id("com.android.library") id("io.realm.kotlin") version "1.16.0" } version = "1.0" kotlin { android() iosX64() iosArm64() sourceSets { val commonMain by getting { dependencies { implementation("io.realm.kotlin:library-base:1.16.0") // If using Device Sync implementation("io.realm.kotlin:library-sync:1.16.0") // If using coroutines with the SDK implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0") } } } } If you use any part of the SDK inside the Android module, add the following compile-time dependencies to your module-level Gradle build file, typically found at
<project>/module/build.gradle:Android Module build.gradledependencies { compileOnly("io.realm.kotlin:library-base:1.16.0") } // If using Device Sync dependencies { compileOnly("io.realm.kotlin:library-sync:1.16.0") }
Supported Target Environments
Kotlin Multiplatform (KMP) supports a wide range of application environments Refer also to Kotlin's Multiplatform Gradle DSL reference: Targets documentation.
Entornos compatibles
The Kotlin SDK supports the following environments:
androidiosArm64iosSimulatorArm64iosX64jvmmacosArm64macosX64
Unsupported Environments
El SDK de Kotlin no es compatible con los siguientes entornos:
androidNativeArm32androidNativeArm64androidNativeX86androidNativeX64iosArm32jslinuxArm32HfplinuxArm64linuxMips32linuxMipsel32linuxX64mingwX64mingwX86tvosArm64tvosSimulatorArm64tvosX64wasm32watchosArm32watchosArm64watchosSimulatorArm64watchosX86watchosX64