Note that there are some explanatory texts on larger screens.

plurals
  1. PONoClassDefFoundError: Urban Airship for Android Push
    primarykey
    data
    text
    <p>I've been trying to set up Urban Airship for days and it really stress me out. Since their instruction isn't clear, I had to follow <a href="http://blog.jamesbaca.net/?p=235" rel="nofollow noreferrer">this one</a> to work through. However, I'm currently getting this errorLogs and trying to see if I can find some help. Please any advice would be greatly appreciated! Thank you!</p> <pre><code>10-18 12:41:10.585: E/AndroidRuntime(11870): FATAL EXCEPTION: main 10-18 12:41:10.585: E/AndroidRuntime(11870): java.lang.NoClassDefFoundError: com.urbanairship.UAirship 10-18 12:41:10.585: E/AndroidRuntime(11870): at com.app.android.NotifyMeApplication.onCreate(NotifyMeApplication.java:15) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:973) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3971) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.app.ActivityThread.access$1300(ActivityThread.java:128) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.os.Handler.dispatchMessage(Handler.java:99) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.os.Looper.loop(Looper.java:137) 10-18 12:41:10.585: E/AndroidRuntime(11870): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-18 12:41:10.585: E/AndroidRuntime(11870): at java.lang.reflect.Method.invokeNative(Native Method) 10-18 12:41:10.585: E/AndroidRuntime(11870): at java.lang.reflect.Method.invoke(Method.java:511) 10-18 12:41:10.585: E/AndroidRuntime(11870): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-18 12:41:10.585: E/AndroidRuntime(11870): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-18 12:41:10.585: E/AndroidRuntime(11870): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>I found a similar <a href="https://stackoverflow.com/questions/10672263/java-lang-noclassdeffounderror-com-urbanairship-uairship">qnestion</a> and answers, </p> <p>-Remove all Android Library projects and external jars from the build path.</p> <p>-Create a folder named 'libs' in your project.</p> <p>-Place all external .jars in that folder, the ADT should now place them under 'Android Dependencies'.</p> <p>-Re-import all your previous Android Library projects the normal way.</p> <p>but it doesn't work for me. </p> <p>This is Manifestfile, and the application runs fine if i remove the application name. But I need that in order to enable the push notification..</p> <p>AndroidManifest.xml </p> <pre><code>&lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name="com.app.android.NotifyMeApplication" android:debuggable="true" android:allowClearUserData="true" android:enabled="true" &gt; </code></pre> <p>NotifyMeApplication.java</p> <pre><code>package com.app.android; import com.urbanairship.Logger; import com.urbanairship.UAirship; import com.urbanairship.push.PushManager; import com.urbanairship.push.PushPreferences; import android.app.Application; public class NotifyMeApplication extends Application{ @Override public void onCreate() { super.onCreate(); UAirship.takeOff(this); // always needs to be called when starting an application // even though we call takeoff push notifications are disabled by default // you have to explicitly turn them on like so PushManager.enablePush(); // let the push manager know about our intent receiver PushManager.shared().setIntentReceiver(IntentReceiver.class); // name must match broadcast receiver from step 7 // set some preferences for sounds and vibration PushPreferences prefs = PushManager.shared().getPreferences(); prefs.setSoundEnabled(true); prefs.setVibrateEnabled(true); // apid is a unique identifier for a particular device String lPushId = prefs.getPushId(); Logger.info("My Application onCreate - App APID: " + lPushId); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload