A QR code scanner app is used to scan barcodes and Quick Response codes used widely in lots of operations. You can create your own version of QR scanner in Android Studio easily having no knowledge in programming.

Open Android Studio> Create New Project> Create Empty Screen> Edit name and Package name.

Android Studio automatically creates a hello world app for you.  Now follow the below steps for setting up the android project.

1. Add the below permission to manifest.xml file  (Camera Permission)



2. Add QR Scanner Android Library (Zxing Library)


3. Add the below code to main_activity.xml in res> layout folder



3. Add the below code to MainActivity.java file in your project.


That's all you'll need to do now to avoid errors clean up the project and rebuild it.
Select Build> Clean Project - This will clean project
Select Build> Rebuild Project - This will Rebuild the Project.

Now you can debug the app in an emulator or on a live device. but for the release version, you'll need to generate signed apk or android bundle.