Hey, I'm developing a KMP library targeting iOS &...
# multiplatform
v
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
Don’t drop jars like that, use Gradle. Your project is missing the dependencies of your library.
v
Yeah, it is missing dependency. How can I generate jar file so everything work fine? I picked automatically generated jar from shared code.
k
Hey @Vinod Rai did you solve a problem? I’m having similar problem
v
Not yet..using it as a module for now. Pls let me know if you find something
a
@Vinod Rai were you able to resolve this issue? I am running into this as well
a
@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
@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.
a
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.
103 Views