googlesamples / googlesamples/mlkit

[Bug report] Running the mlkit_code_scanner_sample is not downloading Barcode UI

Open
#641 12 comments 3 reactions 1 assignee Claimed by @zhouyiself View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

I am running the codescanner-project `mlkit/android/codescanner` on a Samsung Galaxy A40 running Android 11 with latest updates installed. The device is only for testing, connected to wifi, no login to any service nor any sim-card. There is 46 GB available diskspace.

The app is installed via android studio Electric Eel and usb.

1. Install codescanner-demo from android studio on device.
2. Select either Java or Kotlin
3. Press SCAN BARCODE button
4. Message is "Failed to scan code: com.google.mlkit.MlKitException: Waiting for the Barcode UI module to be downloaded"
5. Press button after five minutes, same message

I have added the following to settings.gradle.
```
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
```

build.gradle (project):
```
buildscript {
ext.kotlin_version = '1.4.31'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}
```

build.gradle (code-scanner-sample)
```
dependencies {
implementation 'com.google.android.gms:play-services-code-scanner:16.0.0-beta3'
}
```

AndroidManifest.xml:
```

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.