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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:30:09+00:00 2026-06-08T17:30:09+00:00

I’m trying to set-up a basic structure for my project, which is supposed to

  • 0

I’m trying to set-up a basic structure for my project, which is supposed to run on API-levels 8 – 16, uses google location services and ActionBarSherlock.

See my other question for the setup.

I generated a simple activity with Eclipse (Master-Detail-Flow). My project currently has just one Activity and one Fragment. All I did so far is replacing the super classes with their ABS counterparts:

public class CouponListActivity extends SherlockFragmentActivity implements CouponListFragment.Callbacks {
...
}

and

public class CouponListFragment extends SherlockListFragment {
...
}

This is the one and only layout-element I’m using

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:name="....activity.CouponListFragment"
    android:id="@+id/coupon_list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginLeft="16dp"
    android:layout_marginRight="16dp"
    tools:context=".CouponListActivity" />

This runs fine on an emulator on API 16, but fails on another emulator with API 8.

The problem is that I cannot interpret the stacktrace in any helpful way. My code does not the seem to get touched at all…

java.lang.NullPointerException
    at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
    at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
    at android.widget.AbsListView.obtainView(AbsListView.java:1315)
    at android.widget.ListView.makeAndAddView(ListView.java:1727)
    at android.widget.ListView.fillDown(ListView.java:652)
    at android.widget.ListView.fillFromTop(ListView.java:709)
    at android.widget.ListView.layoutChildren(ListView.java:1580)
    at android.widget.AbsListView.onLayout(AbsListView.java:1147)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
    at android.view.View.layout(View.java:7035)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4627)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

Where can I start looking for the problem? Let me know if I can provide more information.

Update: I have the exact same stacktrace if I rule out ABS and simply try to create a List-Activity / -Fragment combination that runs in API 8. Here is the project.

  • 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-08T17:30:10+00:00Added an answer on June 8, 2026 at 5:30 pm

    After reviewing your source code, you are using simple_list_item_activated_1 resource. Which was new to Android API level 11 So Solution for your problem is.

    onCreate method should be something like this

    @Override
     public void onCreate(final Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setListAdapter(new ArrayAdapter<DummyContent.DummyItem>(getActivity(), android.R.layout.simple_list_item_activated_1,android.R.id.text1, DummyContent.ITEMS));
     }
    

    Since this was new to API Level 11, You will get same error with or without ActionBarSherlock. If you want to use simple_list_item_activated_1 then you need to create a local copy of it. Sorry for being late

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I would like to run a str_replace or preg_replace which looks for certain words
I'm making a simple page using Google Maps API 3. My first. One marker
I'm trying to select an H1 element which is the second-child in its group
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.