Skip to main content

How to fix run-time error: Could not find class 'winterwell.jtwitter.Twitter'

If you follow the Marakana Android Bootcamp Series 2012 Video Tutorials, you may get this run-time error when practice the sample application Yamba-1.

06-03 10:48:43.695: E/dalvikvm(274): Could not find class 'winterwell.jtwitter.Twitter', referenced from method com.marakana.yamba1.StatusActivity.onCreate
06-03 10:48:43.695: W/dalvikvm(274): VFY: unable to resolve new-instance 42 (Lwinterwell/jtwitter/Twitter;) in Lcom/marakana/yamba1/StatusActivity;
06-03 10:48:43.695: D/dalvikvm(274): VFY: replacing opcode 0x22 at 0x0045
06-03 10:48:43.695: D/dalvikvm(274): VFY: dead code 0x0047-0057 in Lcom/marakana/yamba1/StatusActivity;.onCreate (Landroid/os/Bundle;)V
06-03 10:48:43.955: D/dalvikvm(274): GC_EXTERNAL_ALLOC freed 794 objects / 58272 bytes in 127ms
06-03 10:48:44.184: D/AndroidRuntime(274): Shutting down VM
06-03 10:48:44.184: W/dalvikvm(274): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-03 10:48:44.194: E/AndroidRuntime(274): FATAL EXCEPTION: main
06-03 10:48:44.194: E/AndroidRuntime(274): java.lang.NoClassDefFoundError: winterwell.jtwitter.Twitter
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.marakana.yamba1.StatusActivity.onCreate(StatusActivity.java:43)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.os.Looper.loop(Looper.java:123)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.main(ActivityThread.java:4627)
06-03 10:48:44.194: E/AndroidRuntime(274):     at java.lang.reflect.Method.invokeNative(Native Method)
06-03 10:48:44.194: E/AndroidRuntime(274):     at java.lang.reflect.Method.invoke(Method.java:521)
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-03 10:48:44.194: E/AndroidRuntime(274):     at dalvik.system.NativeStart.main(Native Method)

Looked back into the Yamba-1 folder, jtwitter-yamba.jar was there.

Solution:
Make a new folder called libs under Yamba-1 and move this external libary inside sub-folder libs

Credit:
Sven Rau  http://marakana.com/forums/android/learning_android_book/689.html#p1790

Comments

Popular posts from this blog

Visual Studio 2010 Keyboard Shortcuts

These keyboard shortcuts are helpful. Some of them are not document in Visual Studio 2010 Express, for example: <Ctrl> F5 to run the application without debug <Ctrl> Period or <Ctrl> Space for code completion. <Ctr> <Shift> <B> to build the solution For more download the Visual Studio 2010 Keybinding Posters from Microsoft. Credit:  Visual Studio 2010 Keyboard Shortcuts - ScottGu's Blog DevCurry: 30 Favorite Visual Studio Keyboard Shortcuts

SQL Questions and Answers - Part 3

What is a view? A view can be thought of as either a virtual table or a stored query. The data accessible through a view is not stored in the database as a distinct object. What is stored in the database is a SELECT statement. The result set of the SELECT statement forms the virtual table returned by the view. ( msdn.microsoft.com ) What is an Index? A Microsoft® SQL Server™ index is a structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure that allows SQL Server to find the row or rows associated with the key values quickly and efficiently. ( msdn.microsoft.com ) What are all the different types of indexes? These are different types of indexes in Microsoft SQL Server 2008R2: Clustered : A clustered index sorts and stores the data rows of the table or view in order based on the clustered index key. The clustered index is implemente

Recent Activity

It’s fun to check my email account recent activity. Here is the fun. Someone attempted to log in to my account from other countries. It is good to check activity log in your Gmail, Hotmail, Yahoo, Facebook, and other accounts frequently.