Roberto Leinardi
05/14/2022, 10:11 PMUnresolved reference
.
The crazy thing is that the the enum on the same package is perfectly fine. And so is the AAR of the classic view library.
And of course the issue does not happen if I import the gradle module directly instead of using the AAR.
Do I need to do something special to generate an AAR with Composable?
build.gradle of the library moduleRoberto Leinardi
05/14/2022, 10:14 PMtad
05/14/2022, 10:31 PM*Kt.class
files are just the top-level declarations from the .kt file, not the classes that are missing from that import list.Roberto Leinardi
05/14/2022, 10:33 PMtad
05/14/2022, 10:35 PMRoberto Leinardi
05/14/2022, 10:37 PMtad
05/14/2022, 10:47 PMtargetSdkVersion
for a library project; usually you specify a minSdkVersion
and let the consuming application set the target, otherwise there are some arcane rules used by the manifest mergertad
05/14/2022, 10:48 PMtad
05/14/2022, 10:49 PM*.kotlin_module
which would probably explain why the top-level functions aren't being resolvedtad
05/14/2022, 10:50 PMpackagingOptions
and only add what's necessary to get the project to buildLeland Richardson [G]
05/14/2022, 11:30 PMAlbert Chang
05/15/2022, 3:12 AMMETA-INF/<module name>.kotlin_module
from the aar. That file is needed to access top-level members.Roberto Leinardi
05/15/2022, 8:06 AMtargetSdkVersion
set for all the modules via build conventionsRoberto Leinardi
05/15/2022, 8:26 AMpackagingOptions
exclusion list was causing the problem! I don't remember from where I took that list but it never occurred that could have these side effects on AAR (I'm using it for months on a couple of apps without issue). But yeah, from now on I'll drop it and just manually add only what's needed.
Thanks a lot!Roberto Leinardi
05/15/2022, 10:35 AM