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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:42:40+00:00 2026-06-07T09:42:40+00:00

Exception, nothing beyond this. Normally logcat has more useful information, but in this case,

  • 0

Exception, nothing beyond this. Normally logcat has more useful information, but in this case, sadly not much.

07-06 13:26:26.654: E/AndroidRuntime(726): java.lang.NullPointerException
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:192)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1074)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.ScrollView.onMeasure(ScrollView.java:296)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.ViewRoot.performTraversals(ViewRoot.java:839)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.os.Looper.loop(Looper.java:130)
07-06 13:26:26.654: E/AndroidRuntime(726):  at android.app.ActivityThread.main(ActivityThread.java:3683)
07-06 13:26:26.654: E/AndroidRuntime(726):  at java.lang.reflect.Method.invokeNative(Native Method)
07-06 13:26:26.654: E/AndroidRuntime(726):  at java.lang.reflect.Method.invoke(Method.java:507)
07-06 13:26:26.654: E/AndroidRuntime(726):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-06 13:26:26.654: E/AndroidRuntime(726):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-06 13:26:26.654: E/AndroidRuntime(726):  at dalvik.system.NativeStart.main(Native Method)

The start of my layout xml is (I suspect something silly missed out in the first half of xml) journey.xml

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:baselineAligned="false"
        android:orientation="horizontal"
        android:weightSum="2" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:orientation="vertical" >
            //Skipped some code I think wont help debug this
            <Spinner
                android:id="@+id/startInMinutes"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

The first activity, calls this activity. The first few lines of the activity below.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.journey);
    // Some more code
    // Adapter related code for ListView
    vehicleListView = (Spinner) findViewById(R.id.vehicleList);
    vehicleListView.setAdapter(new ArrayAdapter<String>(this,
            android.R.layout.simple_spinner_item, vehicleList));
    vehicleListView.setOnItemSelectedListener(this);
    vehicleListView.setSelection(0);

Edit : Root cause was, vehicleList array had null values.

  • 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-07T09:42:42+00:00Added an answer on June 7, 2026 at 9:42 am

    That NullPointerException appears most likely because you have null values in the array/List that you pass in the ArrayAdapter‘s constructor for one of your Spinners.

    By default an ArrayAdapter will call the method toString on the data items and use that to set the text on the row’s TextView if the type of data for the ArrayAdapter is not of type CharSequence.

    Print the values of your data arrays(vehicleList and Globals.TIME_WINDOW) and make sure you don’t have null values in them.

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

Sidebar

Related Questions

Exception in thread main java.lang.NullPointerException at Library.loadBooks(Library.java:179) at UseLibrary.main(UseLibrary.java:105) This error makes me crazy!
Exception: Object reference not set to an instance of an object. Code: For Each
Exception in thread Thread-2 java.lang.NumberFormatException: For input string: 3 int test = Integer.parseInt(result[0]); This
When Exception is displayed (or more general - when it is converted to String)
Argument exception error is thrown at the following code. It's a simple code but
I am getting an exception error, Input string was not in a correct format.
So far I only found two ways: throw exception play nothing ad.2. Pretty recent
I am using Gesture Listner to acheive Swipe screen navigation. But it is not
I have try-except block in python, and I want to do nothing when exception
Catch ex As Exception GetTTCFTPini = {Nothing} End Try it says at the GetTTCFTPini

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.