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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:01:23+00:00 2026-06-14T10:01:23+00:00

I have this type of error can you help me how can i solve

  • 0

I have this type of error can you help me how can i solve it
or what is the problem
knowing that this code i use it with other spinner with other class and it is work
so it kind of confusing me
dose the problem having because i have to spinner or it not?
her is my logcat

    11-16 21:56:27.841: E/AndroidRuntime(794): FATAL EXCEPTION: main
11-16 21:56:27.841: E/AndroidRuntime(794): java.lang.NullPointerException
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:291)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.widget.AbsSpinner.setAdapter(AbsSpinner.java:113)
11-16 21:56:27.841: E/AndroidRuntime(794):  at com.example.test1.MainActivity$LoadAllSection.onPostExecute(MainActivity.java:220)
11-16 21:56:27.841: E/AndroidRuntime(794):  at com.example.test1.MainActivity$LoadAllSection.onPostExecute(MainActivity.java:1)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.os.AsyncTask.finish(AsyncTask.java:417)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.os.AsyncTask.access$300(AsyncTask.java:127)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.os.Looper.loop(Looper.java:123)
11-16 21:56:27.841: E/AndroidRuntime(794):  at android.app.ActivityThread.main(ActivityThread.java:4627)
11-16 21:56:27.841: E/AndroidRuntime(794):  at java.lang.reflect.Method.invokeNative(Native Method)
11-16 21:56:27.841: E/AndroidRuntime(794):  at java.lang.reflect.Method.invoke(Method.java:521)
11-16 21:56:27.841: E/AndroidRuntime(794):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-16 21:56:27.841: E/AndroidRuntime(794):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-16 21:56:27.841: E/AndroidRuntime(794):  at dalvik.system.NativeStart.main(Native Method)
  • 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-14T10:01:24+00:00Added an answer on June 14, 2026 at 10:01 am

    From the logcat:

    Caused by: java.lang.NullPointerException
        at com.example.test1.MainActivity$LoadAllSection.doInBackground(MainActivity.java:195)
    

    And since you said this is line 195:

    sectionList.add(map1);
    

    It simply means that sectionList is null, you forgot to initialize it with:

    sectionList = new ArrayList<HashMap<String, String>>();
    

    Ok, with your new LogCat the trouble starts with line 220, which appears to be:

    spinner2.setAdapter(adapter2); 
    

    Once again sectionList is to blame, this error only occurs when you try to pass an adapter bound to a null dataset.

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

Sidebar

Related Questions

I have an interesting problem. I'd like to create a generic class that can
I am rx this error on Deserialization: Invalid wire-type; this usually means you have
I have this type which is basically a struct { int x,y,z; } that
I have this anonymous type : var t= new {a=1,b=lalala,c=DateTime.Now}; How can I make
Lets say have this immutable record type: public class Record { public Record(int x,
i have some simple Export/Import Scenario that i can't figur out why this not
Can you please help me to solve the following problem. I am running a
just want to ask anyone here can solve this problem? I want to create
Here is the code I have came up for this problem. $link = mysql_connect($host,
I have this type of structure <ul> <li>one</li> <li> two has children <ul> <li>a</li>

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.