0

I am facing the Below mentioned LogCat error.

10-15 05:01:48.477: E/AndroidRuntime(1600): Process: com.thehealthsite, PID: 1600
 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.thehealthsite/com.thehealthsite.ui.StoryListActivity}: java.lang.ClassNotFoundException: Didn't find class "com.thehealthsite.ui.StoryListActivity" on path: DexPathList[[zip file "/data/app/com.thehealthsite-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.thehealthsite-1, /system/lib]]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    at android.app.ActivityThread.access$800(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5017)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.thehealthsite.ui.StoryListActivity" on path: DexPathList[[zip file "/data/app/com.thehealthsite-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.thehealthsite-1, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
    ... 11 more

Although I had mentioned everything in my Manifest File. My manifest.xml file is as follows:-

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="20" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:logo="@drawable/ic_launcher"
        android:theme="@style/Theme.Healthsite" 
        android:hardwareAccelerated="true">
       <activity android:name="com.thehealthsite.ui.StoryListActivity"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.thehealthsite.ui.StoryDetails2"
                android:logo="@drawable/ic_launcher"
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:screenOrientation="sensor">
                <intent-filter>
                <action android:name="com.thehealthsite.ui.StoryDetailIntent2.LAUNCH" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.item/vnd.bgr.story" />
                </intent-filter>
        </activity>

        <activity android:name="com.thehealthsite.ui.ClickedUrl"
            android:logo="@drawable/ic_launcher"
            android:configChanges="orientation|screenLayout">

        </activity>

        <activity android:name="com.thehealthsite.ui.FilteredStoryListActivity"
                  android:screenOrientation="portrait" />
        <activity android:name="com.thehealthsite.ui.StoryCommentActivity" />
        <activity android:name="com.thehealthsite.ui.DisqusComment" />
        <activity android:name="com.google.ads.AdActivity"
                android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

        <activity
            android:name="com.thehealthsite.ui.GalleryViewShow"
            android:screenOrientation="portrait" />
        <provider
            android:name="com.thehealthsite.provider.StoryProvider"
            android:authorities="com.thehealthsite" />
    </application>

</manifest>

I had tried all other possible methods such as, Clearing the Projects, Adding External Jars. Restarting Eclipse several Times, but nothing has worked for me.

Note:- If I run the same project on Samsung Galaxy S3, no logcat output is obtained and the App simply crashes, whereas if I run the App on the Emulator it gives the LogCat output and crashes, Hence the LogCat output I did provided is of my Emulator.

Any help would be Appreciated.

Amsheer
  • 7,046
  • 8
  • 47
  • 81
Pravinsingh Waghela
  • 2,516
  • 4
  • 32
  • 50

1 Answers1

-1

Try to delete project's and app's "build" dir,then rebuild your project.

常兆鹏
  • 1
  • 1