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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:10:24+00:00 2026-06-09T06:10:24+00:00

I am seeing a class not found exception for android.view.fragment although I am using

  • 0

I am seeing a class not found exception for android.view.fragment although I am using the compatibility library. Compiles fine but crashes. Is there another package that I should use when pre 3.0? I already changed all fragment classes to android.support.v4.app.Frament but it still crashes because of what is in the layout. My SDK is 4.03 but device is 2.3.

Here is layout

    <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<fragment
    android:id="@+id/frag_series"
    android:layout_width="200dip"
    android:layout_height="match_parent"
    android:layout_marginTop="?android:attr/actionBarSize"
    class="com.authorwjf.hello_fragments.ListFrag" />
<fragment
    android:id="@+id/frag_capt"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.authorwjf.hello_fragments.DetailFrag" />
</LinearLayout>

LogCat:

08-08 14:53:21.644: E/AndroidRuntime(13056): Caused by: android.view.InflateException:     Binary    XML file line #6: Error inflating class fragment
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:200)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.app.Activity.setContentView(Activity.java:1647)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at com.authorwjf.hello_fragments.Main.onCreate(Main.java:11)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
08-08 14:53:21.644: E/AndroidRuntime(13056):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-08 14:53:21.644: E/AndroidRuntime(13056):    ... 11 more
08-08 14:53:21.644: E/AndroidRuntime(13056): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.authorwjf.hello_fragments-2.apk]
08-08 14:53:21.644: E/AndroidRuntime(13056):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
  • 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-09T06:10:26+00:00Added an answer on June 9, 2026 at 6:10 am

    Do the same in your layout XML:

    <android.support.v4.app.Fragment />
    

    Also, note the capitalization.

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

Sidebar

Related Questions

I've found articles that describe issues similar to mine but not close enough. I
Preface: I am not using *.xib files. I instantiate a UINavigationController in a class
I'm seeing a lot of people using the Razor view engine for email templates.
I have one debugger visualizer for seeing list of class object in the form
I keep seeing references to _internal in examples like the following: class Symbol {
With a very simple Mockito run JUnit test and class I am seeing different
Seeing lots of SOAP/RDS stuff, but just want to dump some MySQL data and/or
After seeing tons of web site using modal window with a nice expansion animation
Ok this is probably just me not knowing enough about php but here it
MyView.xaml <UserControl x:Class=CCTrayHelperWPF.View.StatusView xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006 xmlns:d=http://schemas.microsoft.com/expression/blend/2008 mc:Ignorable=d d:DesignHeight=30 d:DesignWidth=1200> <Grid > <Label Content={Binding

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.