Closed kumaraish closed 6 years ago
Feel free to ask this question on StackOverflow.
It is already asked there. No takers yet - https://stackoverflow.com/q/49115995/1363471 Thanks.
Actually am also facing this same issue. Even many have faced this issue and reported over stackoverrlow but with no luck.
My observation: I found when the pojo is inside another library module, compiler does some name mangling (eg. Arg0, Args1... for parameters in pojo) So if the entity inside app module refer pojo in another module, it won't work as it expects parameters as arg0, arg1 (you could try to rename pojo parameter with args0,.., it will compile). But if we could disable the name mangling for embedded pojo somehow my hunch is it will work. Did you able to solve this problem?
I have a POJO which I am embedding in a Room Entity; Please note that the POJO is defined in a library module;
Compilation fails with
If I remove
@NonNull
annotation from the constructors parameters to Address POJO, the code compiles fine. Also, if the same POJO is in the app module, code compiles.As can be seen,
Address
class does have a public constructor.What am I missing here? What is the definition of
usable constructor
in Room's perspective? Or it is an issue with Room?Versions - implementation 'android.arch.persistence.room:runtime:1.1.0-alpha3' annotationProcessor 'android.arch.persistence.room:compiler:1.1.0-alpha3' gradle 3.0.1 Android Studio 3.0.1