我无法为Google Play服务编译实例ID

时间:2015-07-06 19:12:48

标签: android android-studio google-play-services

我正在尝试添加实例ID(最后一行)

dependencies {
   //Basic Google libs
   compile 'com.android.support:support-v4:+'
   compile 'com.android.support:appcompat-v7:22.2.0'
   compile 'com.google.android.gms:play-services-base:7.5.0'
   compile 'com.google.android.gms:play-services-gcm:7.5.0'
   compile 'com.google.android.gms:play-services-location:7.5.0'
   compile 'com.google.android.gms:play-services-maps:7.5.0'
   compile 'com.google.android.gms:play-services-wallet:7.5.0'
   compile 'com.google.android.gms.iid:7.5.0'
}

但我一直在接受:

  

错误:无法解决:com.google.android.gms.iid:7.5.0:

有什么线索?

3 个答案:

答案 0 :(得分:6)

没有类似:google play services提供的'com.google.android.gms.iid:7.5.0'

如果您正在寻找身份服务,那么它应该是:

gdb -i=mi test.exe

参考链接:https://developers.google.com/android/guides/setup

答案 1 :(得分:5)

对7.5版不确定 但是对于10.0.1,只需使用

compile 'com.google.android.gms:play-services-iid:10.0.1'

答案 2 :(得分:2)

对于为新GCM,Firebase云消息传递搜索InstanceId的所有人,请改用FirebaseInstanceId。用:

FirebaseInstanceId.getInstance().getToken();

https://firebase.google.com/docs/cloud-messaging/android/client#sample-register

了解详情
相关问题