Skip to content Skip to sidebar Skip to footer

How To Include Dependencies In Android Library Gradle Project?

I'm building an android library project with Gradle using Android Studio. It has some local dependencies: compile project(':androidlibrary') with nested, additional external depend

Solution 1:

I ended up using "download library from maven" feature of Intellj IDEA as described here. It downloads the library and all it's dependencies to the local directory.

Just a friendly warning: including dependencies is considered a very bad practice at SHOULD BE AVOIDED. It may cause conflicts.


Solution 2:

There is no automated way to package the dependencies of the library inside the aar. This is contrary to proper dependency management and can lead to problems down the line.

If you really want to do this, you'd have to gather the dependencies manually (using code in build.gradle) and manually package the files in the aar.


Post a Comment for "How To Include Dependencies In Android Library Gradle Project?"