0

I'm starting with android development, I tried downloading the firebase quickstart but the build fails about some com.google.firebase:firebase-ml-*

Failed to resolve: com.google.firebase:firebase-ml-common:16.1.2
Failed to resolve: com.google.firebase:firebase-ml-vision:17.0.0
Failed to resolve: com.google.firebase:firebase-ml-model-interpreter:16.2.0

How can I understand what is wrong, to correct and build this? Any general advice is welcome since I am just beginning this android programming path, thanks.

Based on what I read on other similar posts, I think the build.gradle script is the first thing I need to show, so:

buildscript {
    repositories {
        jcenter()
        mavenLocal()
        google()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.google.gms:google-services:4.0.2'
    }
}

plugins {
    id 'com.github.ben-manes.versions' version '0.17.0'
}

allprojects {
    repositories {
        //mavenLocal() must be listed at the top to facilitate testing
        mavenLocal()
        jcenter()
        google()
        maven { url 'https://maven.fabric.io/public' }
    }

    // See: https://github.com/ben-manes/gradle-versions-plugin
    dependencyUpdates.resolutionStrategy = {
        componentSelection { rules ->
            rules.all { selection ->
                boolean numbersOnly = (selection.candidate.version ==~ /^[\d.]+$/)
                if (!numbersOnly) {
                    selection.reject("Rejecting: ${selection.candidate.version}")
                }
            }
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
m.ardito
  • 361
  • 3
  • 13
  • Have look [this](https://stackoverflow.com/a/45697298/5110595) – Hemant Parmar Aug 06 '18 at 07:56
  • what do they mean by "top level" build.gradle exactly ? I was looking the one in the top level folder of the quickstart. – m.ardito Aug 06 '18 at 08:04
  • ? as I said, I just downloaded the firebase quickstart from github (it seems to consist of ~15 examples apps) and just opening it fails "syncing" with those three errors... – m.ardito Aug 06 '18 at 08:17

1 Answers1

0

Play services and Firebase dependencies are now available via maven.google.com

Replace this line maven { url 'https://maven.fabric.io/public' }

To :

 maven { url 'https://maven.google.com' }
Hemant Parmar
  • 3,924
  • 7
  • 25
  • 49
  • I already saw that answered to other questions, and didn't work, but now retried: it still didn't work... (replaced both references) – m.ardito Aug 06 '18 at 08:01