找不到com.google.android.gms:strict-version-matcher-plugin:1.1.0 [英] Could not find com.google.android.gms:strict-version-matcher-plugin:1.1.0
问题描述
无法解析配置'classpath'的所有文件.
Could not resolve all files for configuration 'classpath'.
找不到com.google.android.gms:strict-version-matcher-plugin:1.1.0.
Could not find 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.jar 文件:/C:/Users/e1706396/.m2/repository/com/google/android/gms/strict-version-matcher-plugin/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
Searched in the following locations: 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-plugin/1.1.0/strict-version-matcher-plugin-1.1.0.pom file:/C:/Users/e1706396/.m2/repository/com/google/android/gms/strict-version-matcher-plugin/1.1.0/strict-version-matcher-plugin-1.1.0.jar Required by: unspecified:unspecified:unspecified > com.google.gms:google-services:4.2.0
尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
在7s cmd中失败,命令失败,退出代码为1
BUILD FAILED in 7s cmd: Command failed with exit code 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
Node -v 3.10.10, NPM -v 6.10.10
npm -v 6.4.1, 节点-v 8.12.0 节点-v
npm -v 6.4.1, node -v 8.12.0 node -v
推荐答案
我在Android Studio上的Android项目中也遇到过类似的问题.
I have had similar issue in Android Project on Android Studio.
确保您的项目级别的build.gradle文件是这样的
Make sure that your project level build.gradle file is something like this
//顶层构建文件,您可以在其中添加所有子项目/模块共有的配置选项.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
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
}
通过在存储库{}和allprojects {}中同时添加jcenter()和google()的存储库来解决此问题
Solved this issue by adding repositories with both jcenter() and google() in both repositories{} and allprojects{}
这篇关于找不到com.google.android.gms:strict-version-matcher-plugin:1.1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!