Kotlin class rename with upperCase gives me redeclaration error

2.5k Views Asked by At

While trying to rename the kotlin class file.from lowercase to uppercase it do the renaming but it will give run time error of redeclaration of file name.

Is anybody know how to handle it.

2

There are 2 best solutions below

0
Mayur On

Select KotlinFile and Press Shift+F6

0
Alexmelyon On

Try clean your project with menu Build/Clean Project, then double shift and enter your class name. Probably you have two classes with same name in the same package. Rename your existing class and then rename class you wanted.