My app has several modules.
One of these modules is the ProductsModule
. This module depends on two other modules of my app. Let's call them ModuleA
and ModuleB
.
In my app module, I have a class (ProductsStorage
) and no errors appear if I use ProductsModule
.
I've then converted ProductsModule
to an aar
and use it in my app.
The app compiles normally and then runs normally without errors, but AndroidStudio now shows an error in the ProductsStorage
class. Again, the app compiles without error and runs normally.
The error is the following:
Cannot access class 'my.app.package.model.ProductStock'. Check your module classpath for missing or conflicting dependencies
my.app.package.productsmodule.model.ProductDetails public final var productStock: [ERROR : my.app.package.model.ProductStock]
Gradle: :producs_module:@aar
ProductDetails
is a data class that has val productStock: ProductStock
as a constructor parameter.
ProductStock
is a class in ModuleA
. My app module also has access to ModuleA
This happens even if I open my product on different AS versions and invalidate caches does not solve the issue.
How can I make that error disappear? I'm afraid it will have some unexpected behaviour to my app, even if now I cannot see any problem.