Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – Adding kotlinx-datetime to my Kotlin Multiplatform app breaks iOS build

Posted on November 11, 2022 By

Solution 1 :

After upgrading to Kotlin 1.7.0 and using kotlinx-datetime 0.3.2, I started to face the same issue.

As suggested here, upgrading to org.jetbrains.kotlinx:kotlinx-datetime:0.3.3 solved the issue.

Problem :

I was able to successfully run the sample app generated by Android Studio in both Android and iOS. I chose CocoaPods during the Wizard steps.

But when I add kotlinx-datetime to my dependencies, I can only run the app for Android.

My build.gradle.kts :

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.0")
            }
        }
    ...

When adding the library I get the following error:

> Task :shared:linkDebugFrameworkIosX64 FAILED
e: Compilation failed: Expecting descriptor for kotlin.time/TimeMark.<init>|-5645683436151566731[0]

 * Source files: 
 * Compiler version info: Konan: 1.7.0 / Kotlin: 1.7.20
 * Output kind: STATIC_CACHE

e: java.lang.IllegalStateException: Expecting descriptor for kotlin.time/TimeMark.<init>|-5645683436151566731[0]

How to reproduce:

  1. Create a KMM sample app with AS.
  2. Add the library : implementation(“org.jetbrains.kotlinx:kotlinx-datetime:0.3.0”) to the commonMain in the build.gradle.kts
  3. Try to use/import/print LocalDate in any way

Any ideas how to solve this?

READ  [FIXED] java - Why do I get a TransactionTooLargeException?
Powered by Inline Related Posts
Android Tags:android, kmm, kotlin, kotlin-multiplatform

Post navigation

Previous Post: [FIXED] android – W/Firestore: (24.1.2) [CustomClassMapper]: No setter/field for about found on class
Next Post: [FIXED] android – FusedLocationProviderClient and LocationCallback() object queries

Related Posts

[FIXED] YouTube thumbnail image not loading in android using Glide Android
[FIXED] android – tabBar in ModalBottomSheet with dynamic size Flutter Android
[FIXED] java – Passing Bitmap variable to method in extended class Android
[FIXED] java – Android Studio Gson to Internal Storage Android
[FIXED] android – Kotlin Direct Access XML Error on clicking ImageView Android
[FIXED] node.js – Listen for database changes in Android? (Kotlin/Java) Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is the rising action in Julius Caesar?
  • How do you secure a rope to itself?
  • Does waterproof laminate scratch easily?
  • What makes a building prewar?
  • What can you learn in a month without alcohol?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme