1

I am new to installing libraries and I have a really hard time installing ZXing which is a library downloaded from GitHub that makes use of QR codes. Could you please tell me what steps to follow to install it?

deadpixels
  • 769
  • 1
  • 12
  • 21
  • You have two ways to use libraries. Compile the library directly on the build.gradle file is the easy one. If you post the GitHub's library link, I can help you more. – Marco Vignoli Dec 22 '14 at 11:49
  • Thank you! Here it it: https://github.com/zxing/zxing/ – deadpixels Dec 22 '14 at 11:59
  • I need to create an app that makes use of the library. I need to be able to generate and scan QR codes among other things – deadpixels Dec 22 '14 at 12:00

2 Answers2

4

Seems like Zxing is on maven : http://mvnrepository.com/artifact/com.google.zxing

You should be able to import it by adding its name to your build.gradle file.

To be very specific, this will do the trick :

compile 'com.google.zxing:core:3.1.0'
Rogue
  • 751
  • 1
  • 17
  • 36
  • Thank you, that fixed it! How do I import something that is not on maven though? – deadpixels Dec 22 '14 at 14:34
  • Depends, if author provides a jar, you import it with the "add jar dependecy" menu. Otherwise you have to compile it. This being said, most java libs are either on maven or come in a nicely packaged jar. – Rogue Dec 22 '14 at 16:06
0

Asumming you mean how to use it, I usually prefer just getting the .jar file version from the internet, and copying it into the libs folder in my android application folder. In Netbeans, it is automatically loaded and you can use it immediately. Saves me quite some time.

Peter
  • 648
  • 7
  • 26