Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:40:40+00:00 2026-06-18T01:40:40+00:00

I have a fragmentActivity where I build a tabHost and in each tab there

  • 0

I have a fragmentActivity where I build a tabHost and in each tab there is a Fragment. Well, I haver four tabs 3 with info and 1 with a fragment where is included a google-map-v2 (is a fragmentMAp in a Fragment because I want to add buttons etc.), when I select one tab and pass to other everything go well, but when I select the map tab, after that other tab and again the map tab an error is throw.

My view seems like:

|__||__|__|__|
| __________ |
|| FRAGMENT ||
||_____   _ ||
|| FRAG| |_|||
|| MAP |    ||
||     |    ||
||_____|    ||
||__________||

The error:

01-29 08:32:56.979: E/AndroidRuntime(27738): FATAL EXCEPTION: main
01-29 08:32:56.979: E/AndroidRuntime(27738): android.view.InflateException: Binary XML file line #11: Error inflating class fragment
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:587)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at com.monumentos.vistasmovil.MonumentoMapa.onCreateView(MonumentoMapa.java:127)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentManagerImpl.attachFragment(FragmentManager.java:1264)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:672)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:461)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at com.monumentos.vistasmovil.Monumento.onTabChanged(Monumento.java:279)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.widget.TabHost.invokeOnTabChangeListener(TabHost.java:436)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.widget.TabHost.setCurrentTab(TabHost.java:421)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:158)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:459)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.View.performClick(View.java:2552)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.View$PerformClick.run(View.java:9229)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.os.Handler.handleCallback(Handler.java:587)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.os.Handler.dispatchMessage(Handler.java:92)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.os.Looper.loop(Looper.java:138)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.app.ActivityThread.main(ActivityThread.java:3701)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at java.lang.reflect.Method.invokeNative(Native Method)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at java.lang.reflect.Method.invoke(Method.java:507)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at dalvik.system.NativeStart.main(Native Method)
01-29 08:32:56.979: E/AndroidRuntime(27738): Caused by: java.lang.IllegalArgumentException: Binary XML file line #11: Duplicate id 0x7f06005c, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:285)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
01-29 08:32:56.979: E/AndroidRuntime(27738):    ... 27 more

The error say:

01-29 08:32:56.979: E/AndroidRuntime(27738): Caused by: java.lang.IllegalArgumentException: Binary XML file line #11: Duplicate id 0x7f06005c, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:285)
01-29 08:32:56.979: E/AndroidRuntime(27738):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
01-29 08:32:56.979: E/AndroidRuntime(27738):    ... 27 more

Here is the problem, but I dont know why only this fragment have the problem:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.monumenos_view_preview, container, false);


return view;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:40:41+00:00Added an answer on June 18, 2026 at 1:40 am

    Finally I found the solution, I removed the nested MapFragment in my Fragment:

    public void onDestroyView ()
    {
          try{
        SupportMapFragment fragment = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.mapv2));
            FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
            ft.remove(fragment);
            ft.commit();
          }catch(Exception e){
          }
        super.onDestroyView();  
    }
    

    I get the solution from here: Fragments within Fragments

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a FragmentActivity with 2 tabs. Each tab calls a fragment- Calendar and
I have a FragmentActivity that sets up a tabhost. Each tab is a simple
I have a FragmentActivity which sets a main layout with 3 tabs. Each tab
I am just curious, as I have set up Fragment tabs in a FragmentActivity,
I have have a FragmentActivity with two tabs which are ListFragment s. Each ListFragment
I have have a FragmentActivity with two tabs which are ListFragment s. Each ListFragment
So I have an FragmentActivity that contains 3 tabs, one tab is essentially a
I have next UI hierarchy: FragmentActivity > MapFragment (tabhost with one tab and LocalActivityManager)
I have a tabhost with 5 tabs which are FragmentActivity . One of them
I have the next UI hierarhy: FragmentActivity -> Fragment with TabHost and LocalActivityManager ->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.