Here is my problem.

when I setContentView(map), only a grid is displayed. the ddms logs
have the following messages
09-23 14:05:41.131: WARN/Maps_Persistence(447): Couldn't find file:  /
data/data/MapAppProj.MapAppPack/files/DATA_Preferences
09-23 14:05:41.221: WARN/Maps_Persistence(447): Couldn't find file:  /
data/data/MapAppProj.MapAppPack/files/DATA_Tiles
09-23 14:05:41.251: WARN/Maps(447): Couldn't restore map info, data ==
null
09-23 14:05:41.422: ERROR/AndroidRuntime(447): Uncaught handler:
thread main exiting due to uncaught exception
09-23 14:05:41.442: ERROR/AndroidRuntime(447):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{MapAppProj.MapAppPack/MapAppProj.MapAppPack.MapApp}:
java.lang.IllegalStateException: The specified child already has a
parent. You must call removeView() on the child's parent first.
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2131)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2147)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.os.Handler.dispatchMessage(Handler.java:88)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.os.Looper.loop(Looper.java:123)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread.main(ActivityThread.java:3708)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
java.lang.reflect.Method.invoke(Method.java:492)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:734)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:492)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
dalvik.system.NativeStart.main(Native Method)
09-23 14:05:41.442: ERROR/AndroidRuntime(447): Caused by:
java.lang.IllegalStateException: The specified child already has a
parent. You must call removeView() on the child's parent first.
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.view.ViewGroup.addViewInner(ViewGroup.java:1731)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.view.ViewGroup.addView(ViewGroup.java:1626)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.view.ViewGroup.addView(ViewGroup.java:1606)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
244)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
234)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.Activity.setContentView(Activity.java:1579)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
MapAppProj.MapAppPack.MapApp.onCreate(MapApp.java:18)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1121)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2094)
09-23 14:05:41.442: ERROR/AndroidRuntime(447):     ... 11 more


Any clues?

Best Regards,
Sudheer


On Sep 23, 10:32 am, sudheer <[EMAIL PROTECTED]> wrote:
> Hello Mark
>
> Thanks a lot for that pointer. It worked and the errors went away. but
> now I have the second problem. I see only grids and no map. How can I
> see a map now?
>
> Best Regards,
> Sudheer
>
> On Sep 22, 4:16 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
>
>
> > sudheer wrote:
> > > I have the same problem.I made all mentioned changes to
> > > androidmanifest.xml.
> > > here is my manifest file
>
> > > ?xml version="1.0" encoding="utf-8"?>
> > > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> > >     package="BuddyProj.BuddyPack">
> > >     <uses-permission
> > > android:name="android.permission.ACCESS_COARSE_LOCATION"
> > > />
> > >    <uses-permission android:name="android.permission.INTERNET" /
> > >     <application android:icon="@drawable/icon" android:label="@string/
> > > app_name">
> > >         <activity android:name=".BuddyApp" android:label="@string/
> > > app_name">
> > >         <uses-library android:name="com.google.android.maps" />
> > >             <intent-filter>
> > >                 <action android:name="android.intent.action.MAIN" />
> > >                 <category
> > > android:name="android.intent.category.LAUNCHER" />
> > >             </intent-filter>
> > >         </activity>
> > >     </application>
> > > </manifest>
>
> > AFAIK, your <uses-library> should be inside <application> but not inside
> > <activity>.
>
> > To get a working map application source code, visit:
>
> >http://commonsware.com/Android/
>
> > and click on the Source Code link in the Version 1.2 tab. That's the
> > source code to the samples in my book -- the Maps/NooYawk project shows
> > an activity using MapView.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 1.2 Published!- 
> > Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to