推送通知使用Localytics在Android签名的apk中无效

时间:2016-05-05 11:36:34

标签: push-notification apk signed localytics

当我尝试通过Localytics将推送消息发送到已签名的apk版本时,我收到以下日志。我不明白问题出在哪里,因为我能够收到测试和CUG构建的推送消息,但是没有任何代码更改,签名版本不会收到注册ID。请帮忙。

05-05 14:47:01.672  14210-14237/? E/Localytics﹕ Analytics handler can't handle message 109
    java.lang.RuntimeException: java.lang.ClassNotFoundException: com.google.android.gms.gcm.GoogleCloudMessaging
            at com.localytics.android.ReflectionUtils.helper(Unknown Source)
            at com.localytics.android.ReflectionUtils.tryInvokeStatic(Unknown Source)
            at com.localytics.android.AnalyticsHandler._registerPush(Unknown Source)
            at com.localytics.android.AnalyticsHandler.access$800(Unknown Source)
            at com.localytics.android.AnalyticsHandler$12.run(Unknown Source)
            at com.localytics.android.BaseProvider.runBatchTransaction(Unknown Source)
            at com.localytics.android.BaseHandler._runBatchTransactionOnProvider(Unknown Source)
            at com.localytics.android.AnalyticsHandler.handleMessageExtended(Unknown Source)
            at com.localytics.android.BaseHandler.handleMessage(Unknown Source)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.os.HandlerThread.run(HandlerThread.java:61)
     Caused by: java.lang.ClassNotFoundException: com.google.android.gms.gcm.GoogleCloudMessaging
            at java.lang.Class.classForName(Native Method)
            at java.lang.Class.forName(Class.java:324)
            at java.lang.Class.forName(Class.java:285)
            at com.localytics.android.ReflectionUtils.helper(Unknown Source)
            at com.localytics.android.ReflectionUtils.tryInvokeStatic(Unknown Source)
            at com.localytics.android.AnalyticsHandler._registerPush(Unknown Source)
            at com.localytics.android.AnalyticsHandler.access$800(Unknown Source)
            at com.localytics.android.AnalyticsHandler$12.run(Unknown Source)
            at com.localytics.android.BaseProvider.runBatchTransaction(Unknown Source)
            at com.localytics.android.BaseHandler._runBatchTransactionOnProvider(Unknown Source)
            at com.localytics.android.AnalyticsHandler.handleMessageExtended(Unknown Source)
            at com.localytics.android.BaseHandler.handleMessage(Unknown Source)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.os.HandlerThread.run(HandlerThread.java:61)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.gcm.GoogleCloudMessaging" on path: DexPathList[[zip file "/data/app/com.msf.angelmobile-2/base.apk"],nativeLibraryDirectories=[/data/app/com.msf.angelmobile-2/lib/arm, /vendor/lib, /system/lib]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
            at java.lang.Class.classForName(Native Method)
            at java.lang.Class.forName(Class.java:324)
            at java.lang.Class.forName(Class.java:285)
            at com.localytics.android.ReflectionUtils.helper(Unknown Source)
            at com.localytics.android.ReflectionUtils.tryInvokeStatic(Unknown Source)
            at com.localytics.android.AnalyticsHandler._registerPush(Unknown Source)
            at com.localytics.android.AnalyticsHandler.access$800(Unknown Source)
            at com.localytics.android.AnalyticsHandler$12.run(Unknown Source)
            at com.localytics.android.BaseProvider.runBatchTransaction(Unknown Source)
            at com.localytics.android.BaseHandler._runBatchTransactionOnProvider(Unknown Source)
            at com.localytics.android.AnalyticsHandler.handleMessageExtended(Unknown Source)
            at com.localytics.android.BaseHandler.handleMessage(Unknown Source)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.os.HandlerThread.run(HandlerThread.java:61)
    Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.gcm.GoogleCloudMessaging
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
            ... 16 more
     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

0 个答案:

没有答案