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

  • Home
  • SEARCH
  • 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 8036221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:32:53+00:00 2026-06-05T02:32:53+00:00

Caused by: java.lang.NullPointerException at com.myapp.code.WordDescription.onRestart(WordDescription.java:685) at android.app.Instrumentation.callActivityOnRestart(Instrumentation.java:1245) at android.app.Activity.performRestart(Activity.java:3892) at android.app.Activity.performResume(Activity.java:3911) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2424) I

  • 0
Caused by: java.lang.NullPointerException
at com.myapp.code.WordDescription.onRestart(WordDescription.java:685)
at android.app.Instrumentation.callActivityOnRestart(Instrumentation.java:1245)
at android.app.Activity.performRestart(Activity.java:3892)
at android.app.Activity.performResume(Activity.java:3911)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2424)

I don’t really understand why I keep getting error on WordDescription.onRestart.
Many are complaining of force close issues. Any clue on how to fix this? Thanks

I think this one is related ..

public class MyArrayAdapter extends ArrayAdapter<String> {

    private final Activity context;
    private final String[] aListText;
    private final String [] meaningText;

    public MyArrayAdapter(Activity context, String[] wordText, String[] meaningText) {
        super(context, R.layout.desclist2, wordText);
        this.context=context;
        this.aListText= wordText;
        this.meaningText=meaningText;
    }
} // ..... 

@Override
public void onRestart(){
    super.onRestart();
    clickFlag = false;
    clickWordFlag = false;
    myArrayAdapter.notifyDataSetChanged();  <-- line 685
}
Handler handler = new Handler(){  <-- line 709
    @Override
    public void handleMessage(Message msg){
        progressDialog.dismiss();

        if{ ....
        }else{
            myArrayAdapter = new MyArrayAdapter(WordDescription.this, wordArray, meaningArray);
            listView.setAdapter(myArrayAdapter);
        }

    }
  • 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-05T02:32:56+00:00Added an answer on June 5, 2026 at 2:32 am

    change

    myArrayAdapter.notifyDataSetChanged();
    

    to

    if(myArrayAdapter != null)
          myArrayAdapter.notifyDataSetChanged();
    

    I strongly suggest you to do what Vipul Shah told in his comment.

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

Sidebar

Related Questions

When I got something like this ERROR/AndroidRuntime(18677): Caused by: java.lang.NullPointerException ERROR/AndroidRuntime(18677): at com.companyname.a.a.a(Unknown Source)
15 reports java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oas.fruitkungfufree/com.openfeint.internal.ui.IntroFlow}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) at
I am not sure why I get this error: Caused by: java.lang.RuntimeException: Deferred binding
I have an error when unmarshaling XML to Java object with JAXB: java.lang.NullPointerException at
My app has an occasional bug in it. Flurry shows me this: class java.lang.RuntimeException
Hi everyone this is my first Android app. I new to Java and Eclipse
Getting this error: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
Logcat 08-17 06:37:22.264: ERROR/AndroidRuntime(1090): java.lang.RuntimeException: Unable to start activity ComponentInfo{one.two/one.two.Booking}: java.lang.NullPointerException 08-17 06:37:22.264: ERROR/AndroidRuntime(1090):
I have a simple android app on the market. I have noticed some error
I'm getting the following NullPointerException while trying to use the Play FBConnect module: Caused

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.