EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 441 forks source link

Build Error Android Firebase Barcode #1745

Open markus-tontsch opened 3 years ago

markus-tontsch commented 3 years ago

Hi,

im trying to use the firebase-ml-kit to scan a Code_128. I implemented it according to the readme and it works fine on ios. But if i try to build it for Android, i get the following Error:

Execution failed for task ':app:mergeDexDebug'.
Error: Type com.google.firebase.ml.vision.barcode.internal.zzf is referenced as an interface from `com.google.firebase.ml.vision.barcode.zza`.

Unable to apply changes on device: emulator-5554. Error is: Command ./gradlew failed with exit code 1.`

My app.gradle:

dependencies {
  implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
  implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.0.1'
}
android {
  defaultConfig {
    minSdkVersion 17
    generatedDensities = []
    multiDexEnabled true
  }
  aaptOptions {
    additionalParameters "--no-version-vectors"
  }
}

I added the following to the AndroidManifest.xml:

<meta-data android:name="com.google.firebase.ml.vision.DEPENDENCIES" android:value="barcode" />

My firebase.nativescript.json:

{
    "using_ios": true,
    "using_android": true,
    "analytics": false,
    "firestore": false,
    "realtimedb": false,
    "authentication": false,
    "remote_config": false,
    "performance_monitoring": false,
    "external_push_client_only": false,
    "messaging": false,
    "in_app_messaging": false,
    "crashlytics": false,
    "storage": false,
    "functions": false,
    "facebook_auth": false,
    "google_auth": false,
    "admob": false,
    "dynamic_links": false,
    "ml_kit": true,
    "ml_kit_text_recognition": true,
    "ml_kit_barcode_scanning": true,
    "ml_kit_face_detection": false,
    "ml_kit_image_labeling": false,
    "ml_kit_object_detection": false,
    "ml_kit_automl": false,
    "ml_kit_custom_model": false,
    "ml_kit_natural_language_identification": false,
    "ml_kit_natural_language_translation": false,
    "ml_kit_natural_language_smartreply": false
}