External dependencies not included by the dex compiler

309 views
Skip to first unread message

Stefano

unread,
Mar 21, 2012, 8:21:00 PM3/21/12
to adt...@googlegroups.com
Probably it's just that is quite late here but...when I build my project with external dependencies in Eclipse using the ADT r17, it looks like they are not included by the DEX compiler (resulting in a NoClassDefNotFoundError at run time). Everything works fine when I build it using Maven.

Is anyone else experiencing the same issue?

Mathieu Méa

unread,
Mar 21, 2012, 8:27:27 PM3/21/12
to adt...@googlegroups.com
I have the same issue with the Google Analytics library.

java.lang.NoClassDefFoundError: com.google.android.apps.analytics.GoogleAnalyticsTracker

Was working file before update ting ADK r17.

Mathieu Méa

unread,
Mar 21, 2012, 8:32:56 PM3/21/12
to adt...@googlegroups.com
I fixed the issue by renaming the 'lib' folder to 'libs'.

Stefano Dacchille

unread,
Mar 22, 2012, 5:29:27 AM3/22/12
to adt...@googlegroups.com
Unfortunately that doesn't work if you are using Maven for dependency management.

2012/3/22 Mathieu Méa <mathi...@gmail.com>

John M

unread,
Mar 22, 2012, 4:01:54 AM3/22/12
to adt-dev
I'm getting that problem using Java Build Path->Projects. The
workaround was to remove each sub project from "Projects" and link
each of their source folders in "Source" instead.

I really wish they'd stop breaking things with each new release. I
spent way too long trying to figure that out.

Fredrik Hyttnäs-Lenngren

unread,
Mar 22, 2012, 6:16:18 AM3/22/12
to adt-dev
I was using the android-support-v4.jar and it was placed under
"Reference Libraries" by default. I need to remove all my library
projects and the android-support-v4.jar from the buildpath. Manualy
create a /libs folder, place the android-support-v4.jar there and re-
import my ordinary Library projects. All .jars was then placed by the
ADT in "Android Dependencies" by default and it would run again.
Reply all
Reply to author
Forward
0 new messages