android tutorial - Local binary dependencies in android | Developer android - android app development - android studio - android app developement



You can have a dependency with a single jar or multiple jar files. With a single jar file you can add:

dependencies {
    compile files('libs/local_dependency.jar')
}
click below button to copy code from our android learning website - android tutorial - team

It's possible to add a directory of jars to compile.

dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
}
click below button to copy code from our android learning website - android tutorial - team

The compile line tells the build system to include any JAR files inside the app/libs/ directory in the compilation classpath and in the final package of your app.

If you have modules that require local binary dependencies, copy the JAR files for these dependencies into inside your project.

fileTree(dir: 'libs', include: ['*.jar'])
<moduleName>/libs
click below button to copy code from our android learning website - android tutorial - team

If you need to add an aar files you can read more details here.


Related Searches to Local binary dependencies in android