article

Amelia@Amazon avatar image
Amelia@Amazon posted

Handling Dependency Management with new Android Development Tools   

Summary

Google made a lot of improvements to dependency management of Android projects in revision 17 of the Android SDK tools. Though this has worked for various versions of Android, there are some issues present with targetting Android L.

For more information on recent changes to the SDK tools, see here:

http://tools.android.com/recent

Issue

With the recent release of Android L, a lot of developers found themselves running into 'class not found' errors during development. The reason this happens in L and not in other versions of Android is because L handles the paths of classes differently.

The issue itself mainly happens with apps that use an external jar file as opposed to another method.

Resolution

The way to get around this is to simply rebuild the app using the latest ADT tools available here:

http://developer.android.com/sdk/index.html#Other

It's worth checking if the library folder is called 'lib' as this will need to be renamed to 'libs'. Remove all of the 'Android Library' projects and external .jars from the build path in your project, and then place all of the external .jars into your newly created 'libs' folder if not already there.

See here for more information:

http://tools.android.com/recent/dealingwithdependenciesinandroidprojects

Keywords: Dependencies, Libraries, ADT, SDK Tools

KB_0004

androidlollipop
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Article

Contributors

wangchao contributed to this article rossbria contributed to this article brizzlebrazzle contributed to this article