App loads on device but crashes before it can be run, UrbanAirship as likely cause?

490 views
Skip to first unread message

Nikhil Saraf

unread,
Dec 31, 2013, 11:15:16 AM12/31/13
to apportabl...@googlegroups.com
Hi,

I'm trying to port my iOS app to android. After calling apportable load, excluding all the incompatible code via precompiler directives, and loading again, the app was able to load onto my android device. However, it crashes saying "<app> has stopped" every time. Any help / suggestions are appreciated, please read below for more information...

I can provide more details and log files if needed. Please let me know.

Thanks!
Nikhil


Possible Cause:
I feel it is likely because of Urban Airship not loading properly, because it gives a FATAL EXCEPTION in relation to that. See stack trace below for details

Urban Airship Stack Trace:
E/AndroidRuntime(11369): FATAL EXCEPTION: main
E/AndroidRuntime(11369): java.lang.RuntimeException: Unable to get provider com.urbanairship.UrbanAirshipProvider: java.lang.ClassNotFoundException: Didn't find class "com.urbanairship.UrbanAirshipProvider" on path: /data/app/agreeon.dev.AgreeOn_dev-2.apk:/system/app/MetricsApi-2033410.apk:/system/app/com.amazon.dp.logger.apk
E/AndroidRuntime(11369):        at android.app.ActivityThread.installProvider(ActivityThread.java:4966)
E/AndroidRuntime(11369):        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4577)
E/AndroidRuntime(11369):        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4517)
E/AndroidRuntime(11369):        at android.app.ActivityThread.access$1300(ActivityThread.java:149)
E/AndroidRuntime(11369):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
E/AndroidRuntime(11369):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(11369):        at android.os.Looper.loop(Looper.java:151)
E/AndroidRuntime(11369):        at android.app.ActivityThread.main(ActivityThread.java:5185)
E/AndroidRuntime(11369):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11369):        at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(11369):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(11369):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(11369):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(11369): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.urbanairship.UrbanAirshipProvider" on path: /data/app/agreeon.dev.AgreeOn_dev-2.apk:/system/app/MetricsApi-2033410.apk:/system/app/com.amazon.dp.logger.apk
E/AndroidRuntime(11369):        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
E/AndroidRuntime(11369):        at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
E/AndroidRuntime(11369):        at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
E/AndroidRuntime(11369):        at android.app.ActivityThread.installProvider(ActivityThread.java:4951)
E/AndroidRuntime(11369):        ... 12 more


What I need:
Has anyone seen something like this before? If so, does it seem like Urban Airship is the likely cause, or should I be looking for something else? ( I don't want to lead anyone into solving an UA problem if it is not related to that! ).

If UA is the problem here, is there something I need to change / remove from my configuration.json file to make this work? Do I need to adjust my iOS project file so that Urban Airship is handled by Apportable or does the Apportable SDK pick up on that automatically? Anything else I need to do to make the UA integration work?
All suggestions are welcome.


Hardware/Software Running:
For reference, this is the Apportable SDK that I am using: 7fb8d11ccb9aa00114db8a5b3a2ee6480b091355
I am trying to running it on an Amazon Kindle Fire HDX 7" tablet device.

Nikhil Saraf

unread,
Dec 31, 2013, 3:57:40 PM12/31/13
to apportabl...@googlegroups.com
I did some research on Urban Airship Forums, which brought me to this link: https://support.urbanairship.com/customer/portal/articles/1167797

It basically says that the urban airship library has not been added to the app. Is there something I should be doing regarding this, or does the apportable library take care of exporting private libraries?

Thanks again!
Nikhil

Nikhil Saraf

unread,
Dec 31, 2013, 4:36:12 PM12/31/13
to apportabl...@googlegroups.com
I've been experimenting with the configuration.json file, with the headers, sources, deps, for add_param and remove_param, but I can't really say that I know what I'm doing because it's not working and I'm not very experienced with the configuration.json file.
My intention is to include the "com.urbanairship.UrbanAirshipProvider" class file in the search path so it can find the class file, but I haven't been successful in doing that as yet (or that's not the issue here?).

Something to note is that I'm seeing this when I execute the apportable load command, which tells me its a compilation/linking issue:
~~/AppDelegate.m:50: error: undefined reference to 'UAirshipTakeOffOptionsLaunchOptionsKey'
Build/android-armeabi-debug/agreeon.dev.AgreeOn_dev/AgreeOn-dev/libAgreeOn-dev.a(AppDelegate.m.o):~~/AppDelegate.m:function L_OBJC_CLASSLIST_REFERENCES_$_43: error: undefined reference to 'OBJC_CLASS_$_UAirship'

Thanks!
Nikhil

Nikhil Saraf

unread,
Dec 31, 2013, 5:37:06 PM12/31/13
to apportabl...@googlegroups.com
I checked with apportable support, turns out that UA is not fully supported at the moment, even in the developer preview. They have not yet integrated support for UA in their live SDK yet but plan to push it out in a future SDK release.

To conclude this topic, I removed the "urbanairship" from the features in the configuration.json to allow things to go ahead, which stops the app from crashing at that point.
Reply all
Reply to author
Forward
0 new messages