0

today i updated my adt to v23 and sdk to 4.4.2 ,my project started to throw java.lang.NoClassDefFoundError here is logcat

07-15 00:30:44.480: E/AndroidRuntime(32252): java.lang.NoClassDefFoundError: com.apprevelations.daaku.Profile
07-15 00:30:44.480: E/AndroidRuntime(32252):    at com.apprevelations.daaku.HomeScreen.onClick(HomeScreen.java:378)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.view.View.performClick(View.java:4102)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.view.View$PerformClick.run(View.java:17085)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.os.Handler.handleCallback(Handler.java:615)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.os.Handler.dispatchMessage(Handler.java:92)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.os.Looper.loop(Looper.java:155)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at android.app.ActivityThread.main(ActivityThread.java:5520)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at java.lang.reflect.Method.invokeNative(Native Method)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at java.lang.reflect.Method.invoke(Method.java:511)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
07-15 00:30:44.480: E/AndroidRuntime(32252):    at dalvik.system.NativeStart.main(Native Method)

to solve this i followed these steps

:Remove all Android Library projects and external jars from the build path.
:Place all external .jars in libs folder, the ADT should now place them under  ' Android Dependencies'.
:Re-import all your previous Android Library projects the normal way.

after that it shows com.google.api cannot be resolved but i added all related jar files in libs already enter image description here

matiash
  • 54,791
  • 16
  • 125
  • 154
Himanshu
  • 41
  • 7
  • FYI, there is lots of chatter out there about problems with recent versions of the Android build tools. – EJK Jul 14 '14 at 20:18
  • have you declared your activity class in the manifest? – Abhinav Raja Jul 14 '14 at 20:19
  • Here's one thread on the topic: http://stackoverflow.com/questions/24437564/update-eclipse-with-android-development-tools-v-23 – EJK Jul 14 '14 at 20:21

1 Answers1

0

So, your library com.apprevelations.daaku is loading ok, but you see errors about google api. Maybe you are just missing a project cleaning.

Eclipse -> Project -> Clean...

You can also try:

Android Application -> Properties -> Android -> Google APIS(4.2.2 or any) -> Apply -> ok
Eclipse -> Project -> Clean...
Mikel Pascual
  • 2,202
  • 18
  • 27
  • when i implemented your second option errors are gone but when i try to run application it shows [2014-07-15 03:04:28 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/api/client/http/HttpContent; – Himanshu Jul 14 '14 at 21:36
  • That's most probably happening because you also added google apis in your /lib folder. Should get rid of those jars. You get newer ones with the method I told you. – Mikel Pascual Jul 14 '14 at 22:29
  • i removed google-api-client-1.10.3-beta , google-api-client-android2-1.10.3-beta from /libs folder then it shows The import com.google.api.client.googleapis cannot be resolved – Himanshu Jul 15 '14 at 17:12