https://kotlinlang.org logo
Title
a

adeyds

03/26/2020, 7:57 AM
helooo, how to access layout (a_layout.xml) in module (common module) from other module (feature module) was include in b_layout.xml ? any idea? im trying with kotlin synthetic but error :
unresolved reference
a

Araib

03/26/2020, 12:30 PM
Does your feature module have your common module too? Seems like it doesn't know about common module..
a

adeyds

03/26/2020, 2:09 PM
yes it does. I implement via build.gradle with
implementation project(':common')
a

Anes

03/26/2020, 10:51 PM
Check your import statement, you maybe importing R from feature module not common module
m

miqbaldc

03/28/2020, 11:50 AM
as stated from @Anes there’s 2 approach: 1. use full-qualified import package, e.g:
your.common.module.R.drawable.ic_logo
2. or, you can import aliasing in kotlin, e.g:
import your.common.module.R as CR

CR.drawable.ic_logo
@adeyds