Eclipse has stopped compiling the jar files to my android project, when i deploy it to the device or create a build the reference are not found correctly
Could not find class ‘org.apache.http.entity.mime.MultipartEntity’, referenced from method com.xyz.trySomthing()
I have the httpClient, httpCore, httpMime etc required jar’s. It used to work fine previously but not all the jar files or external libraries are not getting referenced correctly.
Same thing happens for Twitter Jar
java.lang.NoClassDefFoundError: oauth.signpost.commonshttp.CommonsHttpOAuthConsumer
E/AndroidRuntime( 2175): at com.xyz.abc.abcd.askOAuth(BestOf.java:564)
E/AndroidRuntime( 2175): at com.xyz.abc.abcd.access$0(BestOf.java:556)
E/AndroidRuntime( 2175): at com.xyz.abc.abcd$3$1.onClick(BestOf.java:230)
E/AndroidRuntime( 2175): at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:873)
E/AndroidRuntime( 2175): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime( 2175): at android.widget.ListView.performItemClick(ListView.java:3513)
E/AndroidRuntime( 2175): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
E/AndroidRuntime( 2175): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2175): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2175): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 2175): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 2175): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2175): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 2175): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
E/AndroidRuntime( 2175): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:647)
E/AndroidRuntime( 2175): at dalvik.system.NativeStart.main(Native Method)
If you create a folder “libs” in your project ADT will automatically use them. I had the same problem, in an older version of ADT it was working fine with an external project but now it was giving me NoClassDefFoundError. The solution was to create a jar and place it in “libs” folder.