1

ok so my app installs and runs fine on an android phone during development when I connect it through usb. But when I deployed to production, now it gives me "Unfortunately app has stopped" every time I open the app.

I have tried suggestions from others where I cleared up the data and cache but not those buttons were disabled for me. seems like there was no cache or data to clear.

how can I find out whats causing the issue? has anyone had this problem before?

NEW UPDATE:

so I commented out the 
proguard.cfg as shown in the project.properties and then it worked.  
so there is something wrong in the proguard.cfg 
Can some one see if there is anything obvisous please? 
I am using exactly what urban airship suggested on their sample proguard.cfg

Appreciate all your helps

Heres the Logs from Google Play:

java.lang.RuntimeException: Unable to create application com.rccw.android.MyApplication: 
java.lang.IllegalArgumentException: Application configuration is invalid.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4828)
at android.app.ActivityThread.access$1300(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5454)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Application configuration is invalid.
at com.urbanairship.m.b(Unknown Source)
at com.urbanairship.m.a(Unknown Source)
at com.redcarpetcarwash.android.MyApplication.onCreate(Unknown Source)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4825)




Heres my project.properties
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

 proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

#proguard.config=proguard.cfg

# Project target.
target=Google Inc.:Google APIs:17

enter code hereHeres the Proguard.cfg

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

# Suppress warnings if you are NOT using IAP:                                                       
-dontwarn com.urbanairship.iap.**

# Required if you are using Autopilot
-keep public class * extends com.urbanairship.Autopilot

# Required if you are using the airshipconfig.properties file                                       
-keepclasseswithmembers public class * extends com.urbanairship.Options {
    public *;
}

-keepclasseswithmembers class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmemberns class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}
John Rambo
  • 87
  • 10
  • 1
    did you see logs for the app from the playstore? what does it say? – Niraj Adhikari Dec 18 '13 at 16:46
  • Something is happening in onCreate of your MyApplication. Something in your Proguard config is probably tripping you up. If you decode your stack trace you'll be able to see it better: http://developer.android.com/tools/help/proguard.html#decoding – Tenfour04 Dec 18 '13 at 17:25

2 Answers2

2

It sounds like your configuration is invalid from another question (Urban Airship crashes at take off. Illegal Argument Exception) it would lead me to think you need to check that your key and secret key are correct.

from the docs:

airshipconfig.properties

gcmSender = Your Google API Project Number (allows multiple senders separated by commas)
transport = gcm
developmentAppKey = Your Development App Key
developmentAppSecret = Your Development App Secret
productionAppKey = Your Production App Key
productionAppSecret = Your Production App Secret
inProduction = false

Make sure your productionAppKey and productionAppSecret are correct (and probably not the same as your development ones)

Community
  • 1
  • 1
John Boker
  • 82,559
  • 17
  • 97
  • 130
  • I double checke the configs and they are correct. error seems to be caused by the details in teh proguard.cfg file – John Rambo Dec 20 '13 at 04:32
0

I think your ProGuard setup could be tripping up the library you're using. See here for how to set up your ProGuard for Urban Airship. Notably, you probably want to add at least this to your Proguard config:

# Required if you are using the airshipconfig.properties file                                       
-keepclasseswithmembers public class * extends com.urbanairship.Options {
    public *;
}

Or you haven't set up keys correctly, like in the other answer.

In the future, if you're using ProGuard, (and you should be), you need to test the deployed APK before uploading to Google Play.

Tenfour04
  • 83,111
  • 11
  • 94
  • 154
  • Thank you. The error is indeed in the proguard. I decided not to use the urban airship progaurd cfg and it works now. but I still need help figuring out whats wrong with the proguard. please see above. i have added the progard – John Rambo Dec 20 '13 at 04:31