Bug: automatic method creation does not work for kotlin files when called from java


#1

For example i write this code in a java class:

KUtilsKt.someMethod(); and the someMethod() is in red, because this method does not exist in my kotlin KUtils.kt.

What i do in java is press alt+enter and then select “create method”. If the KUtils file would be a java file, then the method would be created with needed argument types and return type specified.

If KUtils is a Kotlin file, then this does not work. Android Studio always suggests me to create a method, but the method is not created with alt+enter menu.


#2

Yes, this is a known issue. https://youtrack.jetbrains.com/issue/KT-7641