https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
v

Vinod Rai

09/04/2020, 8:49 AM
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

09/04/2020, 10:41 AM
Don’t drop jars like that, use Gradle. Your project is missing the dependencies of your library.
v

Vinod Rai

09/04/2020, 11:19 AM
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

10/30/2020, 2:31 PM
Hey @Vinod Rai did you solve a problem? I’m having similar problem
v

Vinod Rai

11/03/2020, 10:45 AM
Not yet..using it as a module for now. Pls let me know if you find something
a

Amritansh

12/10/2020, 9:09 PM
@Vinod Rai were you able to resolve this issue? I am running into this as well
a

Andy Victors

02/05/2021, 3:11 PM
@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

02/05/2021, 3:19 PM
@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

Andy Victors

02/05/2021, 3:21 PM
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.
44 Views