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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:27:06+00:00 2026-06-01T03:27:06+00:00

I do have lots of plain old activity-based apps in the Play Store. Since

  • 0

I do have lots of plain old activity-based apps in the Play Store. Since two days I try to do my first steps with Fragments. I still don’t get it. I’ve read mostly all docs and blogs and guides about Fragments but my stupid simple test app refuses to start with an ClassNotFoundException on MyActivity.

So here’s what I did so far:

The starting FragmentActivity called MyActivity:

public class MyActivity extends FragmentActivity {

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

        setContentView(R.layout.myactivity);
    }
}

Here’s the layout/myactivity.xml:

<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal" >

    <fragment
        class="com.test.app.Table1List"
        android:id="@+id/table1list"
        android:layout_height="match_parent"
        android:layout_width="match_parent" />
</LinearLayout>

This is the ListFragment with its XML file:

public class Table1List extends ListFragment {

    @Override
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        if (viewGroup == null) {
            return null;
        }

        return layoutInflater.inflate(R.layout.table1list, viewGroup);
    }
}

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <ListView
        android:drawSelectorOnTop="false"
        android:fastScrollEnabled="true" 
        android:id="@id/android:list"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent" />

    <TextView
        style="@style/TextViewMedium"
        android:id="@id/android:empty"
        android:text="@string/txt_noresult" />
</LinearLayout>

Call me stupid but I always do get an ActivityNotFoundException during start of the FragmentActivity called MyActivity.

Any help is highly appreciated.

EDIT:

I took the latest v4 Compatibility Package from several days ago. I issued clean projects nearly every 10 minutes – no go.

Here’s the Manifest:

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="1.0"
    package="com.test.app" >

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="11" />

    <application
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/txt_appname" >

        <activity
            android:label="@string/txt_appname"
            android:name="MyActivity" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

EDIT 2: Here’s the LogCat:

Unable to resolve superclass of Lcom/test/app/MyActivity; (25)
Link of class 'Lcom/test/app/MyActivity;' failed
Shutting down VM
threadid=3: thread exiting with uncaught exception (group=0x4001b188)
    Uncaught handler: thread main exiting due to uncaught exception
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.test.app/com.test.app.MyActivity}: java.lang.ClassNotFoundException: com.test.app.MyActivity in loader dalvik.system.PathClassLoader@44bfda38
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
    at android.app.ActivityThread.access$2200(ActivityThread.java:119)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4363)
    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:860)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: com.test.app.MyActivity in loader dalvik.system.PathClassLoader@44bfda38
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
    ... 11 more

EDIT 3: I did re-install the support package, created a new project with Compatability Package v4, stripped down everything to just the MyActivity and one fragment –> same error. I even tested with the previous Support v4 package (Release 6).

These are my first steps with Fragments after nearly three years with Android development (lots of apps in the market). Seems that this whole thing is broken.

This is the project tree in eclipse – any help still highly required.

enter image description here

  • 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-01T03:27:08+00:00Added an answer on June 1, 2026 at 3:27 am

    I don’t know if this will fix your problem but looking at your screenshot, everything looks correct to me except the Referenced Libraries item. That shouldn’t be there any more because the latest ADT version 17 automatically detects all jars in the libs folder. You can get rid of the Referenced Libraries item by removing the explicit reference to the android support jar from your build path.

    I had a very similar problem and was completely stumped for a while until I read this blog post which has a lot of information about this issue so it might be worth a read even if removing the Referenced Libraries doesn’t work.

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

Sidebar

Related Questions

I have a database and lots of html. I'd like to search some plain
I have lots of large plain text documents I wish to parse with perl.
I have lots of directories filled with a bunch of TeX documents. So, there's
I have lots of tables with statistical data (environment related) and wondering if there
We have lots of stored procedures which all contain a lot of comments. Is
I have lots(+2000) of GUIDs(in some network class) and my program must find one
I have lots and lots of C preprocessor #define statements, which make my C
I have lots of files in a particular Directory. In a certain PHP page
I have lots of bson files in the following path: c:/mongodb/bin/dump/Sid If I run
I have lots of vectors like this one below, very sparse, lots of 'NaN'.

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.