There will be two options here:
Route 1 - Using Google Bar Code Reader
If you will be going to this route, one prerequisite will be: you have to use Google Play Services since you'll be using a service from Google (Google Mobile Vision SDK). Try checking their codelab, you'll see all the prerequisite libraries you have to use.
Route 2 - Not using Google Play Services (GPS)
As the route says, this will be using external or 3rd party libraries.
References:
Scan QR code without using google play services
How to install the barcode scanning library without a google account?