9

What does this warning mean?

It is appeared in version 1.0.0-beta-3595 for all usages of kotlin android extensions in my code.

Kotlin warning «Use properties from the build variant packages»

Artyom Krivolapov
  • 3,161
  • 26
  • 32

2 Answers2

6

I think they did this to support multiple build variants. For example when you have a flavour proversion and you want to use a layout from that flavour you have to use

import kotlinx.android.synthetic.proversion.activity_main.*

For the main build variant you have to use

import kotlinx.android.synthetic.main.activity_main.*
Ivan Fork
  • 812
  • 1
  • 9
  • 22
1

Not strictly the answer to the question 'why did they do that', but that's how to eliminate warning. Change

import kotlinx.android.synthetic.activity_main.*

to

import kotlinx.android.synthetic.main.activity_main.*

implying that you already bumped version in build.gradle and updated IDEA (or AS) kotlin plugins.

vigilancer
  • 1,456
  • 14
  • 15