How to add JAR files to your Gradle project Replace your-library-file-name with the name of your library without the file extension as they are and just add your on new lineĬompile (name:'your-library-file-name', ext:'aar') Your might already have other librarires/dependencies here you should leave them And finally, add the library to your ‘module’ Gradle dependencies.To do that add this lines to your ‘module’ level Gradle file:īy default, you might not have any repositories settings in your ‘module’ level ‘adle’ in that case you just can add it to the end of the file outside any other objects.Īlso, it is possible that you already have flatDir in your repositories, in this case, you don’t need to change anything Now you need to make ‘libs’ folder easily accessible.Now open your module level Gradle settings fileįor example, new projects module Gradle settings location should be ‘My Application/app/adle’.If you don’t have ‘libs’ folder then create one.įor example, new projects module ‘libs’ folder location should be ‘My Application/app/libs’ Copy your AAR file to your module ‘libs’ folder.How to add AAR files to your Gradle project You can find more detailed information on dependencies and libraries in extras. But this article is not going to describe all possible solution or explain how they work, here you can find just a few straightforward ways how to do it. Or you can store all your libraries in single place and even create local maven repository and only add references to your libraries in your project. For example, you can add libraries to all modules of your project or only for a single one. There is more than one way you can add AAR files to your project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |