2016-02-10 31 views
2

我試圖將GCM作爲本地包包含。這運行作爲後臺服務,但我不能讓構建成功編譯。我有android.playService.gcm = true作爲構建提示。但我得到了folliwng錯誤。 com.google.android.gms似乎沒有任何內容被提取。我也啓用了gradle build。com.google.android.gms.iid包不存在import com.google.android.gms.iid.InstanceID

/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:15: error: package com.google.android.gms.iid does not exist 
import com.google.android.gms.iid.InstanceID; 
           ^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:16: error: package com.google.android.gms.iid does not exist 
import com.google.android.gms.iid.InstanceIDListenerService; 
           ^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:18: error: cannot find symbol 
public class RixmaInstanceIDListenerService extends InstanceIDListenerService { 
                ^
    symbol: class InstanceIDListenerService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:15: error: cannot find symbol 
import com.google.android.gms.gcm.GcmPubSub; 
           ^
    symbol: class GcmPubSub 
    location: package com.google.android.gms.gcm 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:17: error: package com.google.android.gms.iid does not exist 
import com.google.android.gms.iid.InstanceID; 
           ^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaGcmListenerService.java:20: error: cannot find symbol 
import com.google.android.gms.gcm.GcmListenerService; 
           ^
    symbol: class GcmListenerService 
    location: package com.google.android.gms.gcm 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaGcmListenerService.java:22: error: cannot find symbol 
public class RixmaGcmListenerService extends GcmListenerService { 
              ^
    symbol: class GcmListenerService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:34: error: cannot find symbol 
     startService(intent); 
     ^
    symbol: method startService(Intent) 
    location: class RixmaInstanceIDListenerService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:28: error: method does not override or implement a method from a supertype 
    @Override 
    ^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:40: error: cannot find symbol 
      InstanceID instanceID = InstanceID.getInstance(this); 
      ^
    symbol: class InstanceID 
    location: class RegistrationIntentService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:40: error: cannot find symbol 
      InstanceID instanceID = InstanceID.getInstance(this); 
            ^
    symbol: variable InstanceID 
    location: class RegistrationIntentService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:42: error: cannot find symbol 
        GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); 
             ^
    symbol: variable INSTANCE_ID_SCOPE 
    location: class GoogleCloudMessaging 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:83: error: cannot find symbol 
     GcmPubSub pubSub = GcmPubSub.getInstance(this); 
     ^
    symbol: class GcmPubSub 
    location: class RegistrationIntentService 
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:83: error: cannot find symbol 
     GcmPubSub pubSub = GcmPubSub.getInstance(this); 
         ^
    symbol: variable GcmPubSub 
    location: class RegistrationIntentService 

請指點我哪裏可能會出錯。 非常感謝

回答

1

舊標誌使用播放服務6.5版*上面的方法在7.5版本中引入的,如果我沒有記錯

1

我們暫時禁用了包含here的Gradle構建功能。

只有太多的迴歸,所以現在應該回到舊的Gplay服務標誌。

+0

是...的事情是,即使舊標誌,它不不spcifically接受這些類: com.google.android.gms.iid.InstanceID com.google.android.gms.iid.InstanceIDListenerService com.google.android.gms.gcm.GcmListenerService; – davidwaf

相關問題