Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Alex Hedley
Alex Hedley
16,381 Points

Adding an external Library to an Android Studio Project

I'm trying to integrate the Barcode Scanning solution of Zxing [https://github.com/zxing/zxing/] into my app.

Does anyone have a guide of how to do this with Android Studio?

I've found this, but it uses Eclipse http://techiedreams.com/android-zxing-barcode-scanner-integration/

A good one on SO suggests: http://stackoverflow.com/questions/18735923/importing-jar-libraries-into-android-studio

This is a jar instead of the lib files, which is preferred? Is it one or the other.

Alex Hedley
Alex Hedley
16,381 Points

File | Project Structure

Under 'Modules' I selected "app"

Dependencies

+

1 Library Dependency

Searched for "zxing"

Choose "com.google.zxing:core:3.1.0"

Sync Gradle

Now to see if I can work with it...

Noe Miniel
Noe Miniel
117 Points

Thank you man :D

1 Answer

Jason Losito
Jason Losito
Courses Plus Student 8,865 Points

Hi Alex,

I was able to integrate ZXing. However I have this error - IntentIntegrator() has private access in...

Do you know what's causing this error?