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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:38:59+00:00 2026-06-07T03:38:59+00:00

I get the following error while trying to create a ListFragment in a tab.

  • 0

I get the following error while trying to create a ListFragment in a tab.
I just want to have a list in that fragment, nothing special.. I’am sorry that this is more a lack of knowledge than a bug, but i hung on this problem for 2 days now and don’t know what i shall do else then ask you guys. Thx.

07-07 13:08:18.693: E/AndroidRuntime(19662): FATAL EXCEPTION: main
07-07 13:08:18.693: E/AndroidRuntime(19662): java.lang.RuntimeException: Unable to start activity ComponentInfo{com..bucp/com..bucp.MainActivity}: android.view.InflateException: Binary XML file line #63: Error inflating class fragment
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.os.Looper.loop(Looper.java:137)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.main(ActivityThread.java:4441)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at java.lang.reflect.Method.invokeNative(Native Method)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at java.lang.reflect.Method.invoke(Method.java:511)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at dalvik.system.NativeStart.main(Native Method)
07-07 13:08:18.693: E/AndroidRuntime(19662): Caused by: android.view.InflateException: Binary XML file line #63: Error inflating class fragment
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:255)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.setContentView(Activity.java:1835)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at com..bucp.MainActivity.onCreate(MainActivity.java:21)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.performCreate(Activity.java:4465)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
07-07 13:08:18.693: E/AndroidRuntime(19662):    ... 11 more
07-07 13:08:18.693: E/AndroidRuntime(19662): Caused by: java.lang.ClassCastException: com..bucp.BanlistFragment cannot be cast to android.app.Fragment
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Fragment.instantiate(Fragment.java:574)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Fragment.instantiate(Fragment.java:549)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.onCreateView(Activity.java:4235)
07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
07-07 13:08:18.693: E/AndroidRuntime(19662):    ... 25 more

The given line #63 is the tag of the Fragment:

<fragment        
android:name="com..bucp.BanlistFragment"
android:id="@+id/banl_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/banlist_fragment" />

The fragment file itselve contains:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:paddingLeft="8dp"
         android:paddingRight="8dp">

     <ListView android:id="@id/android:list"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:background="#00FF00"
               android:layout_weight="1"
               android:drawSelectorOnTop="false"/>

     <TextView android:id="@id/android:empty"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:background="#FF0000"
               android:text="No data"/>
</LinearLayout>

And the fragment class just contains

@Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  ListAdapter myListAdapter = new ArrayAdapter<String>(
    getActivity(),
    android.R.layout.simple_list_item_1,
    month);
  setListAdapter(myListAdapter);
 }

 @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
     View tmp_view = inflater.inflate(R.layout.banlist_fragment, container, false);
     ListView list = (ListView) tmp_view.findViewById(android.R.id.list);
  return list;
 }
  • 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-07T03:39:01+00:00Added an answer on June 7, 2026 at 3:39 am

    in stack trace you have: Caused by: java.lang.ClassCastException: com.fr34kyd3v.bucp.BanlistFragment cannot be cast to android.app.Fragment

    I’m guessing, maybe your BanlistFragment class extends Fragment from support library (android.support.v4.app.Fragment) and activity tries to “handle it natively” not with support library?
    To get sth more than guess provide source code for BanlistFragment.

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

Sidebar

Related Questions

While trying to validate my forms i get the following error: Expected a {
While trying to insert data to my SQl db i get the following error
While trying to validate form data on my page i get the following error:
while executing the following query, i get an error that there's an error in
Why do i get the following error Incorrect syntax near 'AUTO_INCREMENT'. while trying to
While i am trying to get value from arraylist,i got the following errors.My sample
I get following error when trying to access Xampp from a network I've tried
I am consistently receiving the following error when trying to create a Web Reference
While trying to create a Bi-directional one-to-one mapping in NHibernate, I found that, I
I have a web application that I'm trying to create a Web Deployment Project

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.