Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the warning «Use properties from the build variant packages» mean?

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»

like image 386
Artyom Krivolapov Avatar asked Dec 05 '15 15:12

Artyom Krivolapov


2 Answers

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.*
like image 162
Ivan Fork Avatar answered Oct 21 '22 06:10

Ivan Fork


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.

like image 36
vigilancer Avatar answered Oct 21 '22 04:10

vigilancer