Skip to content
Advertisement

How to add local .jar file dependency to build.gradle file?

I have tried to add my local .jar file dependency to my build.gradle file:

JavaScript

And you can see that I added the .jar files into the referencedLibraries folder here: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1/referencedLibraries

But the problem is that when I run the command: gradle build on the command line I get the following error:

JavaScript

Here is my entire repo: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1

Advertisement

Answer

If you really need to take that .jar from a local directory,

Add next to your module gradle (Not the app gradle file):

JavaScript

However, being a standard .jar in an actual maven repository, why don’t you try this?

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement