无法解析符号gcm(Android Studio 0.8.9) [英] Cannot resolve symbol gcm (Android Studio 0.8.9)
问题描述
我试图在Android Studio中使用Google Cloud Messaging,但无法找到android:name =com.google.android.gcm.GCMBaseIntentService,并且gcm和GcmIntent出现在阅读中。我安装了Google Play服务v 6.1.11。
在build.gradle中,我编译com.google.android.gms:play-services:6.1.11作为依赖项。
如何,我已经安装了。
我已经打开谷歌播放服务directoy,我还没有找到gcm。我从sdk管理器安装了gcm,但仍然无法识别.GCMBaseIntentService和.GcmIntentService
Im trying to use Google Cloud Messaging with Android Studio, but it cannot find android:name="com.google.android.gcm.GCMBaseIntentService" and the gcm and GcmIntent appears in read. I have intalled Google play services v 6.1.11. In the build.gradle i have compile "com.google.android.gms:play-services:6.1.11" as dependency. How, i have that installed. I had open the google play services directoy and i havent found gcm. I have gcm installed from sdk manager but still doesnt recognize .GCMBaseIntentService and .GcmIntentService
推荐答案
com.google .android.gcm.GCMBaseIntentService
是旧的弃用类,它属于已弃用的 gcm.jar
。由于您使用的是Google Play服务库,因此您无需使用 GCMBaseIntentService
。
com.google.android.gcm.GCMBaseIntentService
is an old deprecated class that belonged to the deprecated gcm.jar
. Since you are using Google Play Services library, there's no need for you to use GCMBaseIntentService
.
这篇关于无法解析符号gcm(Android Studio 0.8.9)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!