AndroidRuntime java.lang.NoClassDefFoundError:

I have an android application which used external library (appcompat-v7) for action bar. My application starts from registration activity then to signin activity and after successful signin Dashboard activity is launched which has actionbar with tabs and swipes. Registration activity and signin activity works fine but when I click on Signin button application crashes with the error mention in title. I have addid the appcompat library to my work space and also added to my project as well. I have checked many solutions at SO but none of them worked for me. here are steps I have done.

Added appcompat to workspace as library project as mention on developer.android page. 
Added jar files of appcompat to build path of appcompat unchecked android dependencies.
Added appcompat library project to my project (say Project X)
Checked all library of project X, fix project properties, clean and rebuild.  
Moved android private libraries to top on order and Export tab.
added appcompatv7 to projects tab on Java build path.
Still no luck :(
My order and export tab looks like this from top to bottom
1-Android Private libraries 
2-Ksoap2-android-assembly-2.4-jar-with-dependencies.jar (Jar file is located in D:\jarfiles)
3-android Dependencies 
4-/gen
5-/src
6-Android 4.4.2 

Here is Manifest

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/CustomActionBarTheme" >
        <activity
            android:name="com.example.appname.registration.Register" (only com.example.appname is replaced with original name of application when posted on SO)
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".registration.SignIn"></activity>
        <activity android:name="DashBoard"></activity>
    </application>

This is Sign in OnClick Event

Intent dashboardintent = new Intent(getApplicationContext(), DashBoard.class);
startActivity(dashboardintent);
finish();

Log Cat

01-28 14:09:14.942: E/AndroidRuntime(658): FATAL EXCEPTION: main
01-28 14:09:14.942: E/AndroidRuntime(658): java.lang.NoClassDefFoundError: com.example.appname.DashBoard
01-28 14:09:14.942: E/AndroidRuntime(658):  at com.example.appname.registration.SignIn$1.onClick(SignIn.java:59)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.view.View.performClick(View.java:2485)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.view.View$PerformClick.run(View.java:9080)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.os.Handler.handleCallback(Handler.java:587)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.os.Looper.loop(Looper.java:123)
01-28 14:09:14.942: E/AndroidRuntime(658):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-28 14:09:14.942: E/AndroidRuntime(658):  at java.lang.reflect.Method.invokeNative(Native Method)
01-28 14:09:14.942: E/AndroidRuntime(658):  at java.lang.reflect.Method.invoke(Method.java:507)
01-28 14:09:14.942: E/AndroidRuntime(658):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-28 14:09:14.942: E/AndroidRuntime(658):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-28 14:09:14.942: E/AndroidRuntime(658):  at dalvik.system.NativeStart.main(Native Method)
01-28 14:09:16.602: I/Process(658): Sending signal. PID: 658 SIG: 9

Answers


Check the library in Order and Export tab under Java Build Path


Prefix dot in front of the class name in Manifest. If this class is in a specific package, then mention that in manifest.

<activity android:name=".DashBoard"></activity>

Please check whether this was the issue.


Try to delete bin folder before run. I had this problem and delete the bin folder saved me


Need Your Help

Singleton instanced two times

c++ cocoa singleton

I am rewriting this question, cause i realized that i didn't understand the problem when first asking this and the question got really messy.

Unable to modify form in Access when linked to ArcGIS

ms-access access-vba arcgis

I created a split Access 2010 database with a backend for just tables and the frontend with queries and forms. The frontend is linked using an OLE DB connection to ArcGIS, which works fine. When ...