RuudJ
RuudJ

Reputation: 63

In Android Studio, pasting Java code into a Kotlin file doesn't convert to Kotlin anymore

When you paste Java code into a Kotlin file in Android Studio, you will get a dialog to convert the Java to Kotlin. When I press "yes" the IDE thinks for a few seconds but nothing happens.

Nothing helps. Does anybody know how to fix this? I really loved this feature.

Upvotes: 3

Views: 1819

Answers (2)

A.R.B.N
A.R.B.N

Reputation: 1155

sometimes, it won't work correctly. try invalidate caches / restart once.

Edit: The online tools has been shutdown.

Upvotes: 1

Skizo-ozᴉʞS ツ
Skizo-ozᴉʞS ツ

Reputation: 20646

Sometimes the IDE it does not convert because its complexity, just try to convert a simple method with a SOPLN and check if it works.

By the way if you want to convert a Java file to a Kotlin one remember that you have the Action of :

enter image description here

Upvotes: 2

Related Questions