This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

adding a jar to my project

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I need to create PDFs in my project and found an amazing library: SPIRE.pdf...

now I need to add the Jar files as a Library.. is there anyone that could help me with this...

I was directed to this answer: https://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library

but can't make out what is going on there as it is talking about another jar file...

Please help

UPDATE...I have received a message from Spire... helping me with it... I will update this post after I have tried their method... thanks...
 
Saloon Keeper
Posts: 5710
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's one or more ready-to use jar files, put them in the "libs" directory, and add something like this to the "dependencies" section of the build.gradle file:

implementation fileTree(dir: 'libs', include: ['*.jar'])

You may have that in there already, if you're using other jar files directly rather than including them from the repository.
 
Ben van Jaarsveld
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim, thanks...

after I have put the jar files n the libs folder, in Android Studio, if you rightclick on the jar file there is an option to add as library.. I did it that way... seems to work, will have a look...

thanks for all the help

 
Saloon Keeper
Posts: 10415
223
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's probably better to use their repository than to have a local copy though. Add this to your repositories:

And this to your dependencies:
 
Ben van Jaarsveld
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Stephan

This also worked amazingly!!!
...................................................................
just another quick question: do anyone of you know where I can find a simple tutorial on how to upload my created documents(and maybe a picture) to Firebase??? all the tutorials I am finding is very murky and I am finding it hard to follow...

Thanks... Ben
 
Stephan van Hulst
Saloon Keeper
Posts: 10415
223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to start a separate topic for that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!