Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8359919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:18:17+00:00 2026-06-09T11:18:17+00:00

OK, so I’m pretty new to this, but I’m getting it. I just ran

  • 0

OK, so I’m pretty new to this, but I’m getting it. I just ran into this error and I have seen other people have had the same problem, but the standard fix (clean) doesn’t work for me. I have no clue how to fix these errors! HELP PLEASE!

first error:

on sp2.setOnItemSelectedListener(new OnItemSelectedListener() { in my else if statement I keep geting this error:

The type new AdapterView.OnItemSelectedListener(){} must implement the inherited abstract method AdapterView.OnItemSelectedListener.onNothingSelected(AdapterView)

I have the onNothingSelected there, and it works in my if statement, I mean all I did was copy and paste and edit.

second error:

on }); at the end of my else if statement i get the error:

Syntax error, insert “;” to complete Statement

but everything is there. the statement is completed!

sp1.setOnItemSelectedListener(new OnItemSelectedListener() {

    public void onItemSelecteds(AdapterView<?> arg0, View arg1,
            int arg2, long arg3) {


             String reg_select = (sp1.getSelectedItem().toString());
                 if (reg_select.contentEquals("Southwest")){
                     sp2.setAdapter(sw_cit_adp); 
                     sp2.setOnItemSelectedListener(new OnItemSelectedListener() {

                            public void onItemSelected(AdapterView<?> arg0, View arg1,
                                    int arg2, long arg3) {
                                // TODO Auto-generated method stub

                             String sw_cit_select = (sp2.getSelectedItem().toString());
                             if (sw_cit_select.contentEquals("Lake Charles")){
                                 sp3.setAdapter(sw_lake_charles_adp); }

                             else if (sw_cit_select.contentEquals("Iowa")){
                                 sp3.setAdapter(sw_iowa_adp); }


                            ;}

                            public void onNothingSelected(AdapterView<?> arg0) {
                                // TODO Auto-generated method stub

                            };});}

                 else if (reg_select.contentEquals("South Central")){
                         sp2.setAdapter(sc_cit_adp); 
                         sp2.setOnItemSelectedListener(new OnItemSelectedListener() {

                                public void onItemSelected(AdapterView<?> arg0, View arg1,
                                        int arg2, long arg3) {
                                    // TODO Auto-generated method stub

                                 String sc_cit_select = (sp2.getSelectedItem().toString());
                                 if (sc_cit_select.contentEquals("Lafayette")){
                                     sp3.setAdapter(sc_lafayette_adp); }

                                 else if (sc_cit_select.contentEquals("Gueydan")){
                                     sp3.setAdapter(sc_gueydan_adp); }


                                ;}
                                public void onNothingSelected(
                                        AdapterView<?> arg0) {
                                    // TODO Auto-generated method stub

                                }



                                ;
                               });
                         }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:18:20+00:00Added an answer on June 9, 2026 at 11:18 am

    You have that method in the wrong place. You can’t have an item selected and nto select anything, that’s non-sensical.

    You need to put the method under the listener, like the onItemSelected, but not inside onItemSelected.

    This is what it should (basically) look like:

        spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
            @Override
            public void onNothingSelected(AdapterView<?> parent) {
            }
    
            @Override
            public void onItemSelected(AdapterView<?> parent, View view,
                    int pos, long id) {
            // Your code to do something with the selected item
            }
        });
    

    Oh, and you need to use the exact method name… it’s onItemSelected not onItemSelecteds

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.