Problem in using MapActivity

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Problem in using MapActivity

Postby manvinder » Tue May 31, 2011 12:14 pm

I have developed an application using using android 2.3.3. the application is working fine. but Now when I tried to include google map in it using MapActivity the application fails to load showing error message "The Application App name has stoped unexpectedly. please try again."... I have already set the Build target to Google API and include the "com.google.android.maps" library in the Application manifest file. Please help me..

Thanks and regards
manvinder
Freshman
Freshman
 
Posts: 2
Joined: Tue May 31, 2011 11:41 am

Top

Re: Problem in using MapActivity

Postby raj_J2ME » Wed Jun 01, 2011 10:29 am

Hi manvinder, there can be x number of reasons for the exception you are getting. Exact reason can be found in the logcat, so check logcat and see what went wrong with the app. Get that and share the same here which will help us to reply.
Thanks with Regards,
Raj - The Kernel
raj_J2ME
Master Developer
Master Developer
 
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,

Re: Problem in using MapActivity

Postby manvinder » Mon Jun 13, 2011 7:21 am

Hi Raj, Sorry for the late reply........

here is the logcat .....

06-13 11:44:27.961: DEBUG/dalvikvm(629): GC_CONCURRENT freed 101K, 71% free 297K/1024K, external 0K/0K, paused 2ms+1ms
06-13 11:44:27.971: INFO/AndroidRuntime(629): NOTE: attach of thread 'Binder Thread #3' failed
06-13 11:44:27.981: DEBUG/dalvikvm(629): Debugger has detached; object registry had 1 entries
06-13 11:44:28.611: DEBUG/AndroidRuntime(639): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-13 11:44:28.621: DEBUG/AndroidRuntime(639): CheckJNI is ON
06-13 11:44:29.501: DEBUG/AndroidRuntime(639): Calling main entry com.android.commands.am.Am
06-13 11:44:29.551: INFO/ActivityManager(61): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=mbi.map/.ThreeSpinner } from pid 639
06-13 11:44:29.591: INFO/ActivityManager(61): Start proc mbi.map for activity mbi.map/.ThreeSpinner: pid=647 uid=10048 gids={3003, 1015}
06-13 11:44:29.621: DEBUG/AndroidRuntime(639): Shutting down VM
06-13 11:44:29.641: DEBUG/dalvikvm(639): GC_CONCURRENT freed 102K, 69% free 319K/1024K, external 0K/0K, paused 2ms+6ms
06-13 11:44:29.691: INFO/AndroidRuntime(639): NOTE: attach of thread 'Binder Thread #3' failed
06-13 11:44:29.701: DEBUG/dalvikvm(639): Debugger has detached; object registry had 1 entries
06-13 11:44:30.911: DEBUG/AndroidRuntime(647): Shutting down VM
06-13 11:44:30.911: WARN/dalvikvm(647): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): FATAL EXCEPTION: main
06-13 11:44:30.932: ERROR/AndroidRuntime(647): java.lang.RuntimeException: Unable to start activity ComponentInfo{mbi.map/mbi.map.ThreeSpinner}: java.lang.ClassCastException: android.app.Application
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.os.Handler.dispatchMessage(Handler.java:99)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.os.Looper.loop(Looper.java:123)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread.main(ActivityThread.java:3683)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at java.lang.reflect.Method.invokeNative(Native Method)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at java.lang.reflect.Method.invoke(Method.java:507)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at dalvik.system.NativeStart.main(Native Method)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): Caused by: java.lang.ClassCastException: android.app.Application
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at mbi.map.ThreeSpinner.populateControls(ThreeSpinner.java:118)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at mbi.map.ThreeSpinner.onCreate(ThreeSpinner.java:113)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
06-13 11:44:30.932: ERROR/AndroidRuntime(647): ... 11 more
06-13 11:44:30.951: WARN/ActivityManager(61): Force finishing activity mbi.map/.ThreeSpinner
06-13 11:44:31.471: WARN/ActivityManager(61): Activity pause timeout for HistoryRecord{406dfed0 mbi.map/.ThreeSpinner}
06-13 11:44:42.168: WARN/ActivityManager(61): Activity destroy timeout for HistoryRecord{406dfed0 mbi.map/.ThreeSpinner}
manvinder
Freshman
Freshman
 
Posts: 2
Joined: Tue May 31, 2011 11:41 am

Re: Problem in using MapActivity

Postby kevat_patel » Tue Jun 14, 2011 3:05 pm

hi manvinder,

try follow code for map it don't require any google map api. your application will also run smoothly.

Uri uri= Uri.parse("geo:0,0?q=anandnagar+bhavnagar");

Intent intent = new Intent(Intent.ACTION_VIEW,uri);

intent.putExtra(SearchManager.QUERY, "Bhavnagar");

startActivity(intent);


Thanks.
kevat_patel
Developer
Developer
 
Posts: 46
Joined: Fri Mar 25, 2011 6:59 am

Re: Problem in using MapActivity

Postby uxc.wilis » Mon Jun 20, 2011 5:27 am

great tutorials,, i can learn from this...

thx.
uxc.wilis
uxc.wilis
Freshman
Freshman
 
Posts: 6
Joined: Thu Dec 30, 2010 3:22 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests