When I paste some Java code into a Kotlin project, Android Studio can convert the syntax. However, when the converter is invoked, it adds several unused imports to the file, which broke my existing code.
import androidx.core.app.ComponentActivity.ExtraData
import androidx.core.content.ContextCompat.getSystemService
import android.icu.lang.UCharacter.GraphemeClusterBreak.T
import android.R
The pasted code snippet doesn't need these imports. Since I already imported my.application.R
but AS adds android.R
, references to R.
will broke.
Why are these added? Is this a bug in the converter? Can I somehow disable it?