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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:05:28+00:00 2026-05-26T22:05:28+00:00

This is my first time using fragments in general so bear with me. I

  • 0

This is my first time using fragments in general so bear with me. I dont really understand what I need to do to get the list to show correctly because as of right now nothing shows when I select a tab in my program. Currently I am getting a runtime error

11-17 16:18:59.410: E/AndroidRuntime(18219): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tyczj.bowling/com.tyczj.bowling.Tabs}: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.tyczj.bowling.BowlersList$BowlersListFragment: make sure class name exists, is public, and has an empty constructor that is public
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1751)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1767)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread.access$1500(ActivityThread.java:122)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1005)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.os.Looper.loop(Looper.java:132)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread.main(ActivityThread.java:4028)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at java.lang.reflect.Method.invokeNative(Native Method)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at java.lang.reflect.Method.invoke(Method.java:491)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at dalvik.system.NativeStart.main(Native Method)
11-17 16:18:59.410: E/AndroidRuntime(18219): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.tyczj.bowling.BowlersList$BowlersListFragment: make sure class name exists, is public, and has an empty constructor that is public
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.Fragment.instantiate(Fragment.java:504)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.tyczj.bowling.Tabs$TabListener.onTabSelected(Tabs.java:110)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.android.internal.app.ActionBarImpl.selectTab(ActionBarImpl.java:483)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.android.internal.app.ActionBarImpl.setSelectedNavigationItem(ActionBarImpl.java:303)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.android.internal.app.ActionBarImpl.setNavigationMode(ActionBarImpl.java:883)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at com.tyczj.bowling.Tabs.onCreate(Tabs.java:25)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1715)
11-17 16:18:59.410: E/AndroidRuntime(18219):    ... 11 more
11-17 16:18:59.410: E/AndroidRuntime(18219): Caused by: java.lang.InstantiationException: com.tyczj.bowling.BowlersList$BowlersListFragment
11-17 16:18:59.410: E/AndroidRuntime(18219):    at java.lang.Class.newInstanceImpl(Native Method)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at java.lang.Class.newInstance(Class.java:1301)
11-17 16:18:59.410: E/AndroidRuntime(18219):    at android.app.Fragment.instantiate(Fragment.java:493)

this is part of my xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" 
android:orientation="horizontal">
<LinearLayout android:layout_width="400dp"
    android:layout_height="match_parent">
    <fragment android:name="com.tyczj.bowling.BowlersList"
    android:id="@+id/bListFrag"
    android:layout_height="match_parent"
    android:layout_width="400dp"/>
</LinearLayout>
</LinearLayout>

this is my ListFragment

public class BowlersList extends ListFragment {

@Override
public void onCreate(Bundle state){
    super.onCreate(state);

    if(getFragmentManager().findFragmentById(R.id.bListFrag)==null){
        BowlersListFragment list = new BowlersListFragment();
        getFragmentManager().beginTransaction().add(R.id.bListFrag, list).commit();
    }
}

public class BowlersListFragment extends Fragment {
      static public final String STATE_CHECKED="com.tyczj.bowling.STATE_CHECKED";

      @Override
      public void onActivityCreated(Bundle state){
          super.onActivityCreated(state);
          BowlersDB db = new BowlersDB(BowlersList.this);
          db.open();
          Cursor c = db.getBowlers();
          startManagingCursor(c);
          String[] names = new String[c.getCount()];
          if(c != null && c.moveToFirst()){
              int i = 0;
              do{
                  names[i] = c.getString(c.getColumnIndex(BowlersDB.NAME));
                i++;
              }while(c.moveToNext());
          }
      }

      @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = inflater.inflate(R.layout.bowlers, container, false);
            return v;
        }
    }
  • 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-05-26T22:05:29+00:00Added an answer on May 26, 2026 at 10:05 pm

    You cannot do Fragment inside a Fragment. Nested Fragments are not supported.

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

Sidebar

Related Questions

I'm using this line to get the beginning time of the first day of
This is my first time using a JFrame. I can't get the window to
This is my first time using a typedef enum and I need some help
This is my first time using a database and I'm not really sure how
This is my first time using Bash, so bear with me. I'm using Git
This is my first time using joomla. I don't know if I'm using the
this is my first time using StAX for parsing XML documents (still in the
I'm fairly new to both Django and Python. This is my first time using
This is the first time ever I'm using AJAX, and I want to do
I'm using this XML classes for the first time and can't find this piece

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.