0
votes

Working on upgrading my UrbanAirship to 7.2. No compilation errors and the app runs fine until it receives a push message. At that point, it crashes with the following stack trace:

UALib: ManifestUtils - Unable to find class: com.urbanairship.push.GCMPushReceiver java.lang.ClassNotFoundException: com.urbanairship.push.GCMPushReceiver 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.urbanairship.util.ManifestUtils.validateManifest(ManifestUtils.java:215) at com.urbanairship.UAirship.validateManifest(UAirship.java:736) at com.urbanairship.UAirship.executeTakeOff(UAirship.java:343) at com.urbanairship.UAirship.access$000(UAirship.java:42) at com.urbanairship.UAirship$2.run(UAirship.java:299) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.urbanairship.push.GCMPushReceiver" on path: DexPathList[[zip file "/data/app/com.xxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx-1/lib/arm, /data/app/com.xxx-1/base.apk!/lib/armeabi-v7a, /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.urbanairship.util.ManifestUtils.validateManifest(ManifestUtils.java:215)  at com.urbanairship.UAirship.validateManifest(UAirship.java:736)  at com.urbanairship.UAirship.executeTakeOff(UAirship.java:343)  at com.urbanairship.UAirship.access$000(UAirship.java:42)  at com.urbanairship.UAirship$2.run(UAirship.java:299)  at java.lang.Thread.run(Thread.java:818)  Suppressed: java.lang.ClassNotFoundException: com.urbanairship.push.GCMPushReceiver 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) ... 10 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

When I check to see if the class is visible (Cmd-O) and start typing, the class comes up immediately.

Has anyone encountered this? I have no idea how to fix it. Thanks.

enter image description here

1
Can you share your AndroidManifest file? I think you might be missing the receiver in the manifest fileandroid_Muncher
@android_Muncher is probably right. Make sure it is in there. And if it already is, try a clean build, Android Studio does inexplicable things sometimes...privatestaticint

1 Answers

2
votes

We renamed GCMPushReceiver to GcmPushReceiver. You should remove all the Urban Airship receivers, services, and activities from your manifest and let auto manifest integration merge them for you.