How can we add local jar file dependency to build gradle file

0 votes

So I have tried to add my local .jar file dependency to my build.gradle file. But I did not succeed. Can anyone guide?

Jun 27, 2018 in Java by Daisy
• 8,140 points
5,362 views

1 answer to this question.

0 votes

You can refer the below code if you need to take that .jar from a local directory, 

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

repositories 
{
   flatDir 
   {
       dirs 'libs'
   }
}


dependencies 
{
   compile name: 'gson-2.2.4'
}
answered Jun 27, 2018 by Akrati
• 960 points

Related Questions In Java

0 votes
2 answers

How can we add the local JAR files to the Maven Project in Java?

Firstly I would like to give credit ...READ MORE

answered Nov 5, 2018 in Java by Sushmita
• 6,920 points
11,791 views
0 votes
2 answers

How can we add leading zeros to the number in Java?

From Java 1.5 you can use the String.format method. ...READ MORE

answered Aug 26, 2019 in Java by Sirajul
• 59,230 points
5,160 views
0 votes
2 answers

How can we add an image to a JPanel?

If you are using JPanels, then are ...READ MORE

answered Sep 20, 2018 in Java by Daisy
• 8,140 points
11,681 views
0 votes
1 answer

How can we run the .jar file by double clicking on windows 7 (64)?

Use the following method to run the ...READ MORE

answered Jun 28, 2018 in Java by sharth
• 3,370 points
1,852 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer

How can we set environment variables from java?

For setting the environment variable, you can ...READ MORE

answered Jun 21, 2018 in Java by Akrati
• 960 points
3,834 views
0 votes
1 answer

How can we use java property files?

You can refer the below code: Properties properties ...READ MORE

answered Jun 28, 2018 in Java by Akrati
• 960 points
673 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP