https://kotlinlang.org logo
k

Kulwinder Singh

12/27/2017, 11:07 AM
I'm having problem with kotlin android extensions and productFlavors. I have two Flavors MatchMaking and Full. so in MatchMaking i am using xml ids directly by android extensions , which imports
import kotlinx.android.synthetic.matchMaking.fragment_match_making_selection.*
this line in MatchMaking flavor but in FULL flavor i am using sourceSet of MatchMaking like this
Copy code
java.srcDirs = ['src/matchMaking/java']
res.srcDirs = ['src/matchMaking/res']
, after doing this i have to change
import kotlinx.android.synthetic.matchMaking.fragment_match_making_selection.*
to
import kotlinx.android.synthetic.full.fragment_match_making_selection.*