Hi, I am using Kotlin reflection in a module and i...
# android
k
Hi, I am using Kotlin reflection in a module and its working fine. But when i created .aar file and used it in another project it started giving error
Copy code
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/reflect/full/KClasses;
Can someone tell why is that happening and how to fix it.
e
AARs don't carry dependencies. you should instead publish to and consume from a Maven repository which will carry the dependency information as metadata.
👍 1
l
If the project is built in release mode, symbols can be obfuscated. Add the Keep annotation to the classes to keep if you control them, or add a proguard rule if not.
👍 1
k
I have made it work using fat aar lib. It was the same issue as @ephemient mentioned. Thanks for the answers 🙂
🙌 1