This is a confusing problem, I’ve tried to use ML-kits barcode scanner to detect QR codes, if I place the dependency implementation 'com.google.mlkit:barcode-scanning:17.2.0'
in the app level Build.gradle the reader works fine. If i ty to add that in my module level build.gradle then the application crashes by citing com.google.android.gms.common.api.optionalmoduleapi
class is not found. What may the issue?
I’ve tried adding the dependency as api from the app module, this works but I cannot do that because it’ll use more space. This app also has an instant app. so the total size of the app cannot exceed 15MB as per the documentation.
amal albert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.