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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:50:49+00:00 2026-06-02T16:50:49+00:00

I’m a bit stuck on this. Android is throwing a ClassNotFoundException even though there

  • 0

I’m a bit stuck on this. Android is throwing a ClassNotFoundException even though there is such a class.

04-20 09:07:50.179: E/AndroidRuntime(525): FATAL EXCEPTION: main
04-20 09:07:50.179: E/AndroidRuntime(525): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.app/com.company.app.Main}: java.lang.ClassNotFoundException: com.company.app.Main
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.os.Looper.loop(Looper.java:137)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread.main(ActivityThread.java:4424)
04-20 09:07:50.179: E/AndroidRuntime(525):  at java.lang.reflect.Method.invokeNative(Native Method)
04-20 09:07:50.179: E/AndroidRuntime(525):  at java.lang.reflect.Method.invoke(Method.java:511)
04-20 09:07:50.179: E/AndroidRuntime(525):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-20 09:07:50.179: E/AndroidRuntime(525):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-20 09:07:50.179: E/AndroidRuntime(525):  at dalvik.system.NativeStart.main(Native Method)
04-20 09:07:50.179: E/AndroidRuntime(525): Caused by: java.lang.ClassNotFoundException: com.company.app.Main
04-20 09:07:50.179: E/AndroidRuntime(525):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
04-20 09:07:50.179: E/AndroidRuntime(525):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-20 09:07:50.179: E/AndroidRuntime(525):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
04-20 09:07:50.179: E/AndroidRuntime(525):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
04-20 09:07:50.179: E/AndroidRuntime(525):  ... 11 more

There is such a class called Main in Main.java.

public class Main extends FragmentActivity which is in the package com.company.app.

It was working before but when I went back to work on the app today it just stopped working. I don’t know what happened.

It is defined correctly in the Manifest.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.company.app"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="4" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" 
        android:theme="@android:style/Theme.Light" >
        <activity
            android:label="@string/app_name"
            android:name=".Main" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Few things I’ve tried:

  • Restarting Eclipse
  • Restarting the emulator
  • Uninstalling and reinstalling the app in the emulator
  • Cleaning the project.
  • Checking if gen and src is in the Source tab of the build path.

As it looks right now, I may have to abandon the current project and start from scratch.

Any help would be much appreciated.

UPDATE:

The app works if Main extends Activity instead of FragmentActivity. Perhaps it is something with the Android Support package?

UPDATE 2:

I’m pretty sure it is. When I don’t use the support package and I use the normal Fragment classes in Android 3.0 and up, the app works fine.


The problem is now fixed. 🙂

For some reason the Android support package removed itself from the /libs directory in the project and it was referencing it from an external location (outside the workspace directory).

I will mark Abdu Egal’s first answer as correct as he directed me on the right track.

  • 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-02T16:50:52+00:00Added an answer on June 2, 2026 at 4:50 pm

    It seems that there is an error in the onCreate of your main activity. Did you provide an onCreate(Bundle savedInstance) if so , try to clear it and see if it works then.

    If that does not work, try to use extend Activity instead of extend FrameActivity.

    Good luck

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I'm parsing an XML file, the creators of it stuck in a bunch social

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.