• Jishin Dev [JD]

    Jishin Dev [JD]

    11 months ago
    Seeing this compiler
    BackendException
    on AS when building a multi module KMM project which uses Jetpack compose
    org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
    and this as render problems when preview tries to load in between
    java.lang.NoSuchMethodError: 'void androidx.compose.material.TextKt.Text...'
    Found a few other people who had the same issue here, on the issuetracker and even on SOF but none of the solutions that worked for them, worked for me unfortunately. More details in the 🧵 .
    Jishin Dev [JD]
    russhwolf
    3 replies
    Copy to Clipboard
  • xiaobailong24

    xiaobailong24

    11 months ago
    Hello, how to slove the problem: From Json Number 1.0 to Kotlin Int:https://github.com/Kotlin/kotlinx.serialization/issues/1653
    xiaobailong24
    1 replies
    Copy to Clipboard
  • m

    MarkRS

    11 months ago
    @Parcelize... really? This seems vital in a KMM project with an Android target, isn't it? But Maven says there are only 12 usages of it, And mine has stopped working. The compiler complains
    Could not find org.jetbrains.kotlin:kotlin-parcelize:1.5.31.
    Searched in the following locations:
      - <https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-parcelize/1.5.31/kotlin-parcelize-1.5.31.pom>
      - <https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-parcelize/1.5.31/kotlin-parcelize-1.5.31.pom>
    Is it relevant that Maven says it's at
    <https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-parcelize-runtime/1.5.31/kotlin-parcelize-runtime-1.5.31.pom>
    If so, how do I refer to it properly? I'm already using the parcelize plugin like the docs tell me to, but I still have this problem 😕
    m
    e
    +1
    5 replies
    Copy to Clipboard
  • d

    darkmoon_uk

    11 months ago
    Just encountered a 'big one' for which I can't find any documentation... When creating a KMM library module, targeting JVM on Java 9+, sooner or later we will need to include a java module, how does this work? Where should I specify it? I've tried naively adding
    module-info.java
    under
    <jvmSourceSet>/java
    but the IDE is not reacting. My immediate case is to add
    java.desktop
    to use some AWT classes.
    d
    e
    +1
    9 replies
    Copy to Clipboard
  • Eric Ampire [MOD]

    Eric Ampire [MOD]

    11 months ago
    Hello everyone, when it's come to create a multi module KMM project, each extra module must have the same structure as the common module or I can just create a simple gradle module with the Kotlin Multi-Plateform plugin that'll only contain common logic
    Eric Ampire [MOD]
    1 replies
    Copy to Clipboard
  • Hari K

    Hari K

    11 months ago
    Hi All, Someone help me how to mock this in KMM androidTest
    Clock.System.now()
    Hari K
    Grégory Lureau
    2 replies
    Copy to Clipboard
  • deviant

    deviant

    11 months ago
    hey guys, how you manage multi flavor builds in your kmm projects?
    deviant
    Zhiqiang Bian
    2 replies
    Copy to Clipboard
  • k

    KamilH

    11 months ago
    Do you know any example of multimodule project that uses any pod in the bottom layer module? I would like to achieve a following structure:
    - data - has pod dependency on any library, eg. AFNetworking and is using this
    - shared - has dependency on data module and uses its code
    - iosApp - has dependency on shared module and uses its code
    I’m trying to connect the dots, but when I’m trying to build an app I’m getting following error:
    > Task :data:cinteropAFNetworkingIosX64 FAILED
    Exception in thread "main" java.lang.Error: /var/folders/2q/gjhd6ng16j51tnmw772w02k40000gp/T/10252343052379226466.m:1:9: fatal error: module 'AFNetworking' not found
    k
    i
    5 replies
    Copy to Clipboard
  • John O'Reilly

    John O'Reilly

    11 months ago
    I have a repository class in shared code that makes use of
    MainScope
    .....looking to test it out by calling from a
    main
    function in
    jvmMain
    source.....is there recommended approach to doing this?
    John O'Reilly
    3 replies
    Copy to Clipboard
  • j

    jimmyt

    11 months ago
    I'm trying to add a dependency on a Pod library from the CocoaPods repository to a KMM project, but I believe that Gradle is somehow causing my Podfile to be read improperly, almost as if the 'pod' command is ignoring it. When I attempt to sync the Gradle project, I get the following error and warning:
    Generating workspace in `shared/build/cocoapods/synthetic/IOS/shared`
    [!] The following Swift pods cannot yet be integrated as static libraries:
    
    The Swift pod `web3swift.pod` depends upon `secp256k1.c`, `keccak.c`, and `scrypt.c`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
    
    [!] Automatically assigning platform `iOS` with version `13.0` on target `App-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `<https://guides.cocoapods.org/syntax/podfile.html#platform>`.
    The CocoaPods section of my build.gradle.kts file (which is located in "Project/shared") looks like this:
    version = "1.0"
    ios()
    cocoapods {
        summary = "A summary to make CocoaPods happy"
        homepage = "A page to make CocoaPods happy"
        ios.deploymentTarget = "13.0"
        pod("web3swift.pod") {
        }
        useLibraries()
        podfile = project.file("../iosApp/Podfile")
    }
    And my Podfile (which is located in "Project/iosApp") looks like:
    source '<https://cdn.cocoapods.org>'
    use_modular_headers!
    target 'App-iOS' do
        platform :ios, '13.0'
    end
    Any idea why I am still getting this error and warning, even though I have clearly implemented the fix in the Podfile? Any help is much appreciated.
    j
    Matti MK
    +1
    12 replies
    Copy to Clipboard