App crashes when it's a signed APK

I've finally finished my app, and it works just fine in debug mode.
However, when I uploaded it to Google Play, and ran it, I have constant crashing when the app starts.

It seems to be a UA-related error, as I have checked my logcat and it gives me the following:


12-07 09:36:43.553: E/AndroidRuntime(11386): Process:, PID: 11386
12-07 09:36:43.553: E/AndroidRuntime(11386):     at$1.onAirshipReady(
12-07 09:36:43.558: W/ActivityManager(1745):   Force finishing activity

The error must be coming from somewhere in the activity, but I'm not sure where.
The code for my UrbanAirship activity is below, but as there's no redline showing an error I think the problem may be elsewhere.



import android.util.Log;

import com.urbanairship.UAirship;
import com.urbanairship.push.notifications.DefaultNotificationFactory;

* Created by Mr. Stuart Saunders on 29/11/2016.

public class UAApplication extends Application {
public void onCreate() {

UAirship.takeOff(this, new UAirship.OnReadyCallback() {
public void onAirshipReady(UAirship airship) {
//Method to get Channel ID, needed for UrbanAirship publishing//
String channelId = UAirship.shared().getPushManager().getChannelId();
Log.v ("My Channel ID: " , channelId);

// Enable user notifications

// Create Notification Factory
DefaultNotificationFactory defaultNotificationFactory = new DefaultNotificationFactory(getApplicationContext());
// Get the Icon image from resources. Needs to be white-on-transparent //
//Optional, for larger image. Uncertain if it's any good//
// Set the accent color. NotificationCompat not recognised at the moment//

Didn't find what you were looking for?

New post


1 comment

  • Stu,

    Would you happen to have the log lines relating to the crash? You should see these either in Android Studio or manually running logcat. I'm not seeing anything that stick out to me given the info you've provided, so there should be more relating to the crash.

    Comment actions Permalink

Please sign in to leave a comment.