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 7055363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:44:21+00:00 2026-05-28T03:44:21+00:00

Eclipse is giving me many errors for one specific line of code says: Multiple

  • 0

Eclipse is giving me many errors for one specific line of code says:

Multiple markers at this line

- Syntax error, insert ")" to complete 
 ConstructorDeclaration
- Syntax error, insert "}" to complete ClassBody
- Syntax error, insert ";" to complete 
 ConstructorDeclaration
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ")" to complete 
 MethodInvocation

The line is:

setOnClickListener(new View.OnClickListener(); {

and on a different line i get errors

Multiple markers at this line

- Syntax error on token ")", delete 
 this token
- Syntax error on token "(", ; expected

for line: public void onClick(View v); {

Heres activity2.java:

package android.app;
import android.app.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;



public class activity2 extends Activity{

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main2);

        Button next = (Button) findViewById(R.id.Back);
        next.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent intent = new Intent();
                setResult(RESULT_OK, intent);
                finish();
            }
            Button sound = (Button) findViewById(R.id.sound);
            setOnClickListener(new View.OnClickListener(); {
                @Override
                public void onClick(View v); {
                    MediaPlayer mp = MediaPlayer.create(TestSonido.this, R.raw.whippingsound);  
                    mp.start();
                }
            }
            ;

    ;
}}
  • 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-05-28T03:44:22+00:00Added an answer on May 28, 2026 at 3:44 am

    This:

                setOnClickListener(new View.OnClickListener(); {
                    @Override
                    public void onClick(View v); {
                        MediaPlayer mp = MediaPlayer.create(TestSonido.this, R.raw.whippingsound);  
                        mp.start();
                    }
                }
    

    should be this:

                setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        MediaPlayer mp = MediaPlayer.create(TestSonido.this, R.raw.whippingsound);  
                        mp.start();
                    }
                })
    

    (no semicolon before the contents of the inner class; and, yes right-parenthesis at end of function call).

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

Sidebar

Related Questions

I have following code for which eclipse giving following compilation error: Multiple markers at
regarding the code below, eclipse is giving me a lot of errors around line
Eclipse is giving me an error on the android:configChanges line in my AndroidManifest.xml: <activity
Here, we are migrating our source code to github, and this transaction is giving
I have an Android project on Eclipse (STS) and it is giving me this
Can Java nest generics? The following is giving me an error in Eclipse: ArrayList<ArrayList<Integer>>
I just downloaded eclipse and made a new c project. This is my code:
Eclipse is giving me an error when defining a top level class with the
The Eclipse org.eclipse.jdt.astview does a great job in giving abstract syntax trees ... but
I programmed the following into Eclipse but the program keeps giving me the error:

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.