2016-11-17 6 views
0

ビルド中にFCMを使用してイオンプッシュ通知を行っています。apkビルドエラーが発生しました。この問題を解決するのに役立ちます。Androidビルドエラー

エラー:cmd:コマンドが終了コード1で失敗しました。エラー出力: FAILURE:例外が発生してビルドに失敗しました。

* 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' 
    ... 
}