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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:41:23+00:00 2026-06-01T12:41:23+00:00

Those who invented Android and Java didn’t invented for themselves. Since I started developing

  • 0

Those who invented Android and Java didn’t invented for themselves. Since I started developing application with Java in Android I get the most ridiculous errors and I am really going crazy (and if I do, Google and Sun Microsystems will make “booooom”)

I have this simple code that is supposed to get the length of a string passed as an argument. The application just crashes, making me spend some minutes swearing and torturing the keyboard.

My code:

@Override
protected void onPostExecute(String result) {
    if (result.length() == 0) {
        txtStatus.setText("Ready");
    }
}

If I remove the condition it works (the text “Ready” is shown on my TextView). This is something weird and I know that I might be missing some little something.

Give me some clues and thanks for everything!

P.S. If you hear a gun shoot coming from your neighbor it might be me.

  • 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-01T12:41:25+00:00Added an answer on June 1, 2026 at 12:41 pm

    Its because your string is perhaps null. Do it like this:

    @Override
    protected void onPostExecute(String result) {
        if (!TextUtils.isEmpty(result)) {
            txtStatus.setText("Ready");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning processing (for those who don't know its a java-based language geared towards
Most likely it's a dumb question for those who knows the answer, but I'm
For those who don't like images: Close logFile Application.DisplayAlerts = False If WasOpened2 Then
A few general questions to those who are well-versed in developing web-based applications. Question
I am developing functionality for Listing email(those who shared) of my-friends(who ever is logged
For those who like a good WPF binding challenge: I have a nearly functional
For those who are not aware, Lotus Notes is a cool system, which has
For those who deal with microcontroller programming... I want to take a momentary contact
(For those who haven't heard of it, Pivotal Tracker is a simple, story-based project
For those who find it too long, just read the bold lines. My project

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.