saving . . . saved spinner position reference error has been deleted. spinner position reference error has been hidden .
spinner position reference error
Title
Question
I am getting following compilation error. Unresolved Reference: position. How to resolve it?

Android-app-using-Kotlin Adding-spinner-and-Image 05-06 min 0-10 sec 15-04-20, 1 p.m. sunny.kondapalli

Answers:

Try the below option:

1. Go to File and close project
2. Reopen the same project.

15-04-20, 2:21 p.m. NirmalaVenkat


naming error just change position to p2  where p2 is a  Int : The position of the view in the adapter

   override fun onItemSelected(p0: AdapterView<*>?, p1: View?, p2: Int, p3: Long) {

                    dept=deptList[p2]




12-05-21, 11:42 p.m. ravikr.973161@gmail.com


Even I got same error for the first time.

Do check that whether you are entering in 'onNothingSelected' or 'onNothingSelected'.
You should enter it in onNothingSelected
07-07-21, 11:43 p.m. Sujan_A_T


Log-in to answer to this question.