1

This is not duplicate of InAppropriate names of parameter in implemented/overrided methods

How to get correct naming for arguments in method. In kotlin when we override any method its arguments name be like p0, p1 upto number of arguments. for example

in java

@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int position) {

}

in kotlin

override fun onCreateViewHolder(p0: ViewGroup, p1: Int): ViewHolder {

}

I already tried the given suggestion/answer in above linked question and restart the android studio and also perform clean/build project. But no success till now. Thanks in Advance

I am using stable release Android Studio 3.2.1 for MAC, compileSdkVersion 28 and also installed sources for the same

enter image description here

EDIT

i also found the same issue has been asked here on SO

Rahul Khurana
  • 8,577
  • 7
  • 33
  • 60

1 Answers1

0

What about your SDK Tools? I've never seen your problem in my projects. Also on Android Studio 3.2.1 (Mac) with compile and target sdk 28

Do you have current kotlin version? I am on 1.2.71.

My SDK Tools below:

SDK Tools

einverne
  • 6,454
  • 6
  • 45
  • 91
thehrlein
  • 133
  • 1
  • 4
  • Yes, i have exactly same configuration as you have. But unfortunately it is not working for me – Rahul Khurana Oct 16 '18 at 09:01
  • this issue is common and has faced by my colleagues as well. on both windows and mac OS. – Rahul Khurana Oct 16 '18 at 10:45
  • What happens if you go (for your example) into your viewholder class and open the corresponding "RecyclerView.ViewHolder" class from what you are extending your viewholder? Do you see the whole sourcecode with all it's methods / implementations / correct parameter names? If not, you probably should re-download all the sources. – thehrlein Oct 16 '18 at 11:00
  • how to re-download them ? – Rahul Khurana Oct 16 '18 at 11:05
  • deselect it --> apply, select it --> apply – thehrlein Oct 16 '18 at 11:47