Convert java to kotlin on paste

2020-08-18 03:01发布

问题:

So I checked "Don't show this dialog next time", but it turns out that it will then never convert the code again.

Where do I remove the checkmark again so I can get back to converting the java code to kotlin when pasted?

Thanks in advance.

https://developer.android.com/kotlin/get-started.html#convert-to-kotlin-code

回答1:

Preferences -> Editor -> General -> Smart Keys -> Scroll to the end -> Convert posted Java code to Kotlin



回答2:

In my case I needed to have the "Do you want to convert ..." dialog again, despite the option to convert checked.

  1. Preferences -> Editor -> General -> Smart Keys -> Scroll to the end -> Convert posted Java code to Kotlin (checked)
  2. Preferences -> Editor -> General -> Smart Keys -> Scroll to the end -> Don't show Java to Kotlin conversion dialog on paste (unchecked)
  3. File -> Invalidate Caches / Restart