2016-11-17 113 views
0

我正在使用FCM在构建apk构建错误came.please帮助我解决此问题时使用FCM离子推送通知。Android构建错误

错误:cmd:命令失败,退出代码为1错误输出: 失败:生成失败并出现异常。

* What went wrong: 
A problem occurred configuring root project 'android'. 
> Could not resolve all dependencies for configuration ':_debugCompile'. 
    > Could not find any version that matches com.google.android.gms:play-service 
s-gcm:9.8+. 
    Versions that do not match: 
     9.4.0 
     9.2.1 
     9.2.0 
     9.0.2 
     9.0.1 
     + 5 more 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm 
/maven-metadata.xml 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm 
/
     https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/ma 
ven-metadata.xml 
     https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/ 
     file:/C:/Users/veeravel.p/android-sdks/extras/android/m2repository/com/ 
google/android/gms/play-services-gcm/maven-metadata.xml 
     file:/C:/Users/veeravel.p/android-sdks/extras/android/m2repository/com/ 
google/android/gms/play-services-gcm/ 
     file:/C:/Users/veeravel.p/android-sdks/extras/google/m2repository/com/g 
oogle/android/gms/play-services-gcm/maven-metadata.xml 
    Required by: 
     :android:unspecified 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output. 
+0

您可以加入您的build.gradle吗? – N0un

+0

确保您在顶级构建文件'dependencies'中使用'classpath'com.google.gms:google-services:3.0.0'' – N0un

回答

0

你必须补充一点,在顶层构建文件:

dependencies { 
    ... 
    classpath 'com.google.gms:google-services:3.0.0' 
    ... 
} 
相关问题