Vinod Rai

    Vinod Rai

    2 years ago
    Hey, I'm developing a KMP library targeting iOS & Android. I have included library in Android app as a Jar. Now getting this exception while trying to access the service. java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/json/JsonKt;
    r

    ribesg

    2 years ago
    Don’t drop jars like that, use Gradle. Your project is missing the dependencies of your library.
    Vinod Rai

    Vinod Rai

    2 years ago
    Yeah, it is missing dependency. How can I generate jar file so everything work fine? I picked automatically generated jar from shared code.
    k

    KamilH

    1 year ago
    Hey @Vinod Rai did you solve a problem? I’m having similar problem
    Vinod Rai

    Vinod Rai

    1 year ago
    Not yet..using it as a module for now. Pls let me know if you find something
    a

    Amritansh

    1 year ago
    @Vinod Rai were you able to resolve this issue? I am running into this as well
    Andy Victors

    Andy Victors

    1 year ago
    @Vinod Rai How did you manage to include ,jar as a module? I am having the same issue - files in .jar are not visible
    And yes, I do include explicit gradle dependency
    a

    Amritansh

    1 year ago
    @Andy Victors this could be a problem with missing transitive dependency on runtime. I think I excluded kotlinx serialization library when adding my library as a dependency to my android app.
    Andy Victors

    Andy Victors

    1 year ago
    I just found a way to add .jar as a module but that does not help - so I think the problem is in jar itself, something is missing.