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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:33:08+00:00 2026-06-14T19:33:08+00:00

Yes, I’m totally new to this platform, but getText() IS a method of EditText,

  • 0

Yes, I’m totally new to this platform, but getText() IS a method of EditText, is it not?

I just copied and pasted the exact error from my simple app, which I copied word-for-word from a web tutorial. I believe it’s self-explanatory. It’s an error that might only come up if there was a misspelling. Below is the context. Error is on the 3rd line down.

public void sendMessage (View view) {
    Intent intent = new Intent(this, DisplayMessageActivity.class);
    EditText editText = (EditText) findViewById(R.id.edit_message);
    String message = editText.getText().toString();
    intent.putExtra(EXTRA_MESSAGE, message);
    startActivity(intent);
}

Would there be ANY circumstance where getText() would NOT be considered a method of EditText?

  • 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-14T19:33:10+00:00Added an answer on June 14, 2026 at 7:33 pm

    Would there be ANY circumstance where getText() would NOT be considered a method of EditText?

    No, getText() is a method in every version of android.widget.EditText. Unless you have created another class with the name EditText, this error is probably Eclipse being confused. Simply clean your project by going to Project -> Clean…


    Addition
    By subtyping MainActivity with EditText, you are inadvertently creating a new, local class named EditText which obscures Android’s EditText class… In general, Activities do not need subtypes. So change this line:

    public class MainActivity<EditText> extends Activity {
    

    To:

    public class MainActivity extends Activity {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes this is an exact duplicate of this question , but the link given
Yes, I'm yet another person to as this annoying question... but I'm not convinced
Yes other people have asked this question before, but not in the same context
Yes this is an exercise from "Building Java Programs", but its not an assigned
Yes, I know this question has been asked before, but I can't find an
Yes, I know this question has been asked a lot of times, but I
Yes, I'm aware that this question has already been post, but ... I'm looking
Yes, this sounds like a simple question, and it probably is. But when i
Yes, this is just a question i would like to get an answer on.
yes this question is asked some times. but I can't find an answer for

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.