Не удалось найти com.google.android.gms: strict-version-matcher-plugin: 1.1.0 - PullRequest
0 голосов
/ 31 октября 2018

Не удалось разрешить все файлы для конфигурации 'classpath'.

Не удалось найти com.google.android.gms: strict-version-matcher-plugin: 1.1.0.

Поиск в следующих местах: https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/1.1.0/strict-version-matcher-plugin-1.1.0.pom https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/1.1.0/strict-version-matcher-plugin-1.1.0.jar file: / C: /Users/e1706396/.m2/repository/com/google/android/gms/strict-version-matcher- файл плагина / 1.1.0 / strict-version-matcher-plugin-1.1.0.pom: / C: /Users/e1706396/.m2/repository/com/google/android/gms/strict-version-matcher-plugin/ 1.1.0 / strict-version-matcher-plugin-1.1.0.jar Требуется: не указано: не указано: не указано> com.google.gms: google-services: 4.2.0

Попробуйте: Запустите с параметром --stacktrace, чтобы получить трассировку стека. Запустите с параметром --info или --debug, чтобы получить дополнительные выходные данные журнала.

Получите дополнительную помощь по номеру https://help.gradle.org

СБОЙ ПОСТРОЕНИЯ в 7s cmd: Сбой команды с кодом выхода 1

плагин я использую

   <plugin name="cordova-plugin-appavailability" spec="^0.4.2" />
    <plugin name="cordova-plugin-camera" spec="^4.0.3" />
    <plugin name="cordova-plugin-compat" spec="^1.2.0" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-googleplus" spec="^5.2.1">
        <variable name="REVERSED_CLIENT_ID" value="xxx" />
    </plugin>
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" />
    <plugin name="cordova-plugin-mfp" spec="^8.0.2018070216" />
    <plugin name="cordova-plugin-mfp-push" spec="^8.0.2018040410" />
    <plugin name="cordova-plugin-network-information" spec="^2.0.1" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.4.1" />
    <plugin name="cordova-wheel-selector-plugin" spec="^1.1.1" />
    <plugin name="info.protonet.imageresizer" spec="^0.1.1" />

Построить Gradle, используя

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        mavenCentral()
        jcenter()
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="27.0.1" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

зависимость может быть, я думаю,

старая или другая система, работающая нормально

Узел -v 3.10.10, NPM -v 6.10.10

Моя текущая системная заметка работает с ошибкой

npm -v 6.4.1, узел -v 8.12.0 узел -v

Ответы [ 3 ]

0 голосов
/ 08 ноября 2018

TL; DR Это проблема, связанная с отчетами репозитория jcenter: он не находит библиотеку, на которую полагаются ваши плагины, многие люди сталкиваются с этой же проблемой. Чтобы она работала, вам нужно установить jcenter в качестве последней опции. в вашем platforms/android/build.gradle файле.

Из этого: platforms/android/build.gradle - Строка 40

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

К этому: platforms/android/build.gradle - Строка 40

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        mavenLocal()
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

Затем попробуйте собрать приложение снова.

Если вы обнаружили ошибку, связанную с отсутствием хранилища google(), попробуйте обновить версию Gradle.

0 голосов
/ 26 ноября 2018

У меня была похожая проблема в Android Project на Android Studio.

Убедитесь, что ваш файл build.gradle уровня проекта выглядит примерно так

// Файл сборки верхнего уровня, в который можно добавить параметры конфигурации, общие для всех подпроектов / модулей.

buildscript {
repositories {
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath 'com.google.gms:google-services:4.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
allprojects {
repositories {
    google()
    jcenter()
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Решил эту проблему, добавив репозитории с jcenter () и google () в обоих репозиториях {} и во всех проектах {}

0 голосов
/ 08 ноября 2018

У меня та же проблема, вызванная cordova-plugin-fcm.

Решено путем добавления Google Maven к Gradle плагинов. Для cordova-plugin-fcm это здесь:

платформы> android> cordova-plugin-fcm> ***. Gradle

Вы можете проверить внутри своей папки cordova-plugin-googleplus или другого плагина, который имеет зависимости от google-сервисов, мой выглядит так:

dependencies {
    ...
    classpath 'com.google.gms:google-services:+'
    ...
}

Мой окончательный код:

buildscript {
    repositories {
        maven { url "https://maven.google.com" }
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:+'
        classpath 'com.google.gms:google-services:+'
    }
}
// apply plugin: 'com.google.gms.google-services'
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
...