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

**URL:** <https://discuss.kotlinlang.org/t/bug-automatic-method-creation-does-not-work-for-kotlin-files-when-called-from-java/3644>\
**Category:** Support\
**Created:** [July 6, 2017, 4:04pm UTC](https://discuss.kotlinlang.org/t/bug-automatic-method-creation-does-not-work-for-kotlin-files-when-called-from-java/3644 "2017-07-06T16:04:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxknvlk](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@lxknvlk](https://discuss.kotlinlang.org/u/lxknvlk)\
**Post date:** [July 6, 2017, 4:04pm UTC](https://discuss.kotlinlang.org/t/bug-automatic-method-creation-does-not-work-for-kotlin-files-when-called-from-java/3644/1 "2017-07-06T16:04:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [July 7, 2017, 8:58am UTC](https://discuss.kotlinlang.org/t/bug-automatic-method-creation-does-not-work-for-kotlin-files-when-called-from-java/3644/2 "2017-07-07T08:58:34Z")

</div>

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