使用GCM取消验证Layer messaging android app时崩溃

时间:2016-03-29 04:53:33

标签: android google-cloud-messaging layer

我正在尝试使用以下电话取消验证我的应用。

layerClient.deauthenticate();

但是我跟着崩溃了。

03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: FATAL EXCEPTION: pool-11-thread-6
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getNoBackupFilesDir
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.iid.zzd.zzdL(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.iid.zzd.<init>(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.iid.zzd.<init>(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.google.android.gms.gcm.GoogleCloudMessaging.unregister(Unknown Source)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.layer.sdk.internal.push.Gcm$2.a(Gcm.java:150)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.layer.sdk.internal.push.Gcm$2.a(Gcm.java:142)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at com.layer.lsdkb.lsdkc.c.run(RetryableTask.java:156)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
03-28 22:30:37.657 16814-20670/com.app.package E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)

我正在使用以下代码初始化我的客户端。

if (layerClient == null) {

LayerClient.enableLogging(this.getApplicationContext());

LayerClient.Options options = new LayerClient.Options();

options.googleCloudMessagingSenderId(Constants.GCM_SENDER_ID);
options.historicSyncPolicy(LayerClient.Options.HistoricSyncPolicy.ALL_MESSAGES);

layerClient = LayerClient.newInstance(this, Constants.LAYER_APP_ID, options);

layerClient.registerConnectionListener(connectionListener);
layerClient.registerAuthenticationListener(authenticationListener);
}

if (!layerClient.isConnected())
layerClient.connect();
else if (!layerClient.isAuthenticated())
layerClient.authenticate();

我正在关注此链接进行整合 https://developer.layer.com/docs/android/integration#installation-and-setup

任何帮助都会很棒。

0 个答案:

没有答案