Unity3D integration - runtime error

Hey supporters,

our team is using Unity3D 5.2.3f1 and we're having issues with the Urban Airship SDK. We built the plugin according to the official manual: http://docs.urbanairship.com/platform/unity.html

When starting the .apk on our testing device we get a classNotFoundException from Java:

D/xyz - UALib( 7291): java.lang.ClassNotFoundException: com.urbanairship.push.GCMPushReceiver

D/xyz - UALib( 7291): at java.lang.Class.classForName(Native Method)
D/xyz - UALib( 7291): at java.lang.Class.forName(Class.java:251)
D/xyz - UALib( 7291): at java.lang.Class.forName(Class.java:216)
D/xyz - UALib( 7291): at com.urbanairship.util.ManifestUtils.validateManifest(ManifestUtil
s.java:238)
D/xyz - UALib( 7291): at com.urbanairship.UAirship.validateManifest(UAirship.java:722)
D/xyz - UALib( 7291): at com.urbanairship.UAirship.executeTakeOff(UAirship.java:373)
D/xyz - UALib( 7291): at com.urbanairship.UAirship.access$000(UAirship.java:62)
D/xyz - UALib( 7291): at com.urbanairship.UAirship$2.run(UAirship.java:315)
D/xyz - UALib( 7291): at java.lang.Thread.run(Thread.java:841)
D/xyz - UALib( 7291): Caused by: java.lang.NoClassDefFoundError: com/urbanairship/push/GCMPus
hReceiver
D/xyz - UALib( 7291): ... 9 more

(complete error log is attached to the post)

We already disassembled the .apk and found out, that the class is actually there, in the correct namespace. What other reasons are there which can provoke that error? What about the version of the Java Development Kit?

I also attached our top-level Android manifest.

Testing device: Samsung GT-N8010 (Galaxy Note 10.1) Android 4.4.2

 

Best regards




gcm_is_unavailable2.txt
android_manifest.xml

Didn't find what you were looking for?

New post

Comments

3 comments

  • Hi Chris,

    This is Sean with Urban Airship Technical Support.

    I wanted to let you know that I'm going to build out a new Unity test app and see if I can't replicate this issue.

    Is there any chance you can attached your UrbanAirship script file from your Unity project?

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0
  • Hey Sean,

    Thanks for your reply.

    We are using the example script of the Unity3D-integration documentation: http://docs.urbanairship.com/platform/unity.html - in section "Using the plugin". We attached that script to our Main Camera.

    Then I have a question: Is it possible to edit the appKey, appSecret and gcmSender in the airshipconfig in Unity? Or is it necessary to rebuild the plugin if there are any changes with these keys?

    Best wishes

    Comment actions Permalink
    0
  • Hi Chris,

    Sorry for the late reply. I was able to create a new Unity project with the latest version of Unity (5.3.2f1) and the latest version of the Android SDK from Android Studio with no issues.

    Have you updated the Android SDK using Android Studio?

    If you update, you will need to rebuild the plugin using ./gradlew build after you update.

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0

Please sign in to leave a comment.