I am trying to build an aar from a KMP library I just created but running PublishToMavenLocal seems to be creating two aar’s debug and release with size in some 100 kbs which doesn’t seem right. Both of them are in build/outputs/aar folder. Please can anyone help me with what I may be doing wrong. Attached is my build.gradle file
what is wrong with this release/debug aar`s that you are seeing?
If you are not doing a lot of stuff in your library. 100k might be a fair size for aar.
At least mine aar`s are around 400-500kb
r
Rahul Rawat
01/14/2022, 6:08 PM
The problem is that when I use the said aar file in android app the following comes
Copy code
java.lang.RuntimeException: Unable to instantiate application com.rawat.address.AddressApp: java.lang.TypeNotPresentException: Type kotlinx.serialization.json.Json not present
a
Anton Afanasev
01/14/2022, 7:01 PM
@Rahul Rawat I do not see that you setup group/artifact/version in you maven publication. Do you see pom file generated?
You must have it so that gradle can bring dependencies you multiplatform depends on.
r
Rahul Rawat
01/14/2022, 7:14 PM
@Anton Afanasev Can you please direct me on how to do that 🙏
Thanks for your help Anton now I am able to build the pom as attached but it seems the real problem has been android studio not being able to transitively add dependencies. Following is how I am adding the aar to my android project