question

John R. Roberts avatar image
John R. Roberts asked

Sample app crashes at runtime

I built CoffeeActivity step 4, installed it, ran it, and got: I/ActivityManager( 204): Start proc com.example.amazon.capitolhillcoffee for activity com.example.amazon.capitolhillcoffee/.CoffeeActivity: pid=1929 uid=10022 gids={3003, 1015} D/dalvikvm( 204): GC_CONCURRENT freed 743K, 11% free 14545K/16263K, paused 1ms+6ms W/dalvikvm( 1929): Exception Ljava/lang/RuntimeException; thrown while initializing Lcom/example/amazon/capitolhillcoffee/CoffeeActivity; W/dalvikvm( 1929): Class init failed in newInstance call (Lcom/example/amazon/capitolhillcoffee/CoffeeActivity;) D/AndroidRuntime( 1929): Shutting down VM W/dalvikvm( 1929): threadid=1: thread exiting with uncaught exception (group=0x40aa01f8) E/AndroidRuntime( 1929): FATAL EXCEPTION: main E/AndroidRuntime( 1929): java.lang.ExceptionInInitializerError E/AndroidRuntime( 1929): at java.lang.Class.newInstanceImpl(Native Method) E/AndroidRuntime( 1929): at java.lang.Class.newInstance(Class.java:1319) E/AndroidRuntime( 1929): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) E/AndroidRuntime( 1929): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1921) E/AndroidRuntime( 1929): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2031) E/AndroidRuntime( 1929): at android.app.ActivityThread.access$600(ActivityThread.java:126) E/AndroidRuntime( 1929): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1166) E/AndroidRuntime( 1929): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 1929): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 1929): at android.app.ActivityThread.main(ActivityThread.java:4486) E/AndroidRuntime( 1929): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1929): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 1929): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) E/AndroidRuntime( 1929): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) E/AndroidRuntime( 1929): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 1929): Caused by: java.lang.RuntimeException: Stub! E/AndroidRuntime( 1929): at com.amazon.geo.maps.GeoPoint. (GeoPoint.java:29) E/AndroidRuntime( 1929): at com.example.amazon.capitolhillcoffee.CoffeeActivity. (CoffeeActivity.java:28) Line 28 in CoffeeActivity.java is: private static final GeoPoint COFFEE_LOCATION = new GeoPoint(COFFEE_LATITUDE, COFFEE_LONGITUDE); I'm building with amazonmaps-1.0.2.jar if that is the correct jar file to use. Any idea why the sample app builds, but does not run on my new Kindle 7" Fire? Device > About reports system version 7.2.3_user_2330720 thanks, John R.
amazon maps
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

John R. Roberts avatar image
John R. Roberts answered
Ah. I see on: https://developer.amazon.com/sdk/maps/building.html That I needed to add the maps jar file as an external jar so it is not included in the APK file. Now the sample app runs fine on the Kindle Fire HD, all be it without map tiles.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi John, its good to know that you solved your issue. Surely this will help other developers in the forum. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.