Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app crashes after SDK-tools update (NoClassDefFound, google analytics)

I just updated my android SDK tools to the newly released version (tools version 22, platform tools version 17)

But now I'm encountering some problems while building my app. The app still launches, but it gives me this exception:

java.lang.NoClassDefFoundError: com.google.analytics.tracking.android.EasyTracker

It has that exception on this line:

EasyTracker.getInstance().setContext(this);

Before the SDK tools update, it was working fine, the libGoogleAnalyticsV2 jar is in the libs folder, in the build path, as it should be.

Git shows me that, while building, eclipse is adding this line in the classpath:

<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>

That's the only difference I see

any idea what's causing this?

like image 993
Quentin Avatar asked May 15 '13 22:05

Quentin


1 Answers

Ok, I found the solution

In the project properties (eclipse) -> java build path -> order and export make sure that all your jars in the libs folder are checked.

like image 136
Quentin Avatar answered Sep 27 '22 18:09

Quentin