Flutter-barcode scanner’s problem

Rudy Wang
Mar 6, 2023

--

my wife
just wanna show my wife.

When I’m learning how to use barcode scanner, I met a problem in Flutter.

It always reports not using gms, although the cam can use it. I can’t convert barcode to text.

Solution :

add this in Android/build.gradle:

  1. classpath ‘com.google.gms:google-services:4.3.13’
step 1

and add this in Android/app/build.gradle:

2. apply plugin: ‘com.google.gms.google-services’

step 2

Run the command on the terminal in Android folder:

3. ./gradlew :app:dependencies

After all, remove steps 1 and 2’s code and run again. it will succeed.

--

--