包com.google.android.gms.iid不存在导入com.google.android.gms.iid.InstanceID

时间:2016-02-10 20:53:57

标签: codenameone

我试图将GCM包含为本机捆绑包。这作为后台服务运行,但我不能让编译成功编译。我有android.playService.gcm = true作为构建提示。但我得到了以下错误。 com.google.android.gms似乎没有被提取。我也启用了gradle build。

/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

请指出我可能出错的地方。 非常感谢

2 个答案:

答案 0 :(得分:1)

我们暂时禁用了Gradle构建功能,涵盖here

有太多的回归,所以现在应该回到旧的gplay服务标志。

答案 1 :(得分:1)

旧标志使用6.5版本的播放服务。*如果我没有弄错,上面的内容是在7.5版本中引入的

相关问题