Hi an alle zusammen,
suche jemanden, der Erfahrung mit folgendem Fehler hat:
Code
07-01 21:33:07.315: E/AndroidRuntime(10120): FATAL EXCEPTION: main
07-01 21:33:07.315: E/AndroidRuntime(10120): android.view.InflateException: Binary XML file line #5: Error inflating class fragment
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
07-01 21:33:07.315: E/AndroidRuntime(10120): at de.so.myteach.PupilDetailMainInfoContactInfoFragment.onCreateView(PupilDetailMainInfoContactInfoFragment.java:24)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:461)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.view.ViewPager.populate(ViewPager.java:1064)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.view.ViewPager.populate(ViewPager.java:911)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1432)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5109)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5109)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1223)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.LinearLayout.onMeasure(LinearLayout.java:576)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5109)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.LinearLayout.measureVertical(LinearLayout.java:833)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5109)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
07-01 21:33:07.315: E/AndroidRuntime(10120): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2397)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.View.measure(View.java:15524)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1986)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1227)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1400)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1120)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4604)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.Choreographer.doFrame(Choreographer.java:525)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.os.Handler.handleCallback(Handler.java:615)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.os.Handler.dispatchMessage(Handler.java:92)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.os.Looper.loop(Looper.java:137)
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.app.ActivityThread.main(ActivityThread.java:4921)
07-01 21:33:07.315: E/AndroidRuntime(10120): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 21:33:07.315: E/AndroidRuntime(10120): at java.lang.reflect.Method.invoke(Method.java:511)
07-01 21:33:07.315: E/AndroidRuntime(10120): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
07-01 21:33:07.315: E/AndroidRuntime(10120): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
07-01 21:33:07.315: E/AndroidRuntime(10120): at dalvik.system.NativeStart.main(Native Method)
07-01 21:33:07.315: E/AndroidRuntime(10120): Caused by: java.lang.IllegalArgumentException: Binary XML file line #5: Duplicate id 0x7f090022, tag null, or parent id 0x0 with another fragment for de.so.myteach.PupilDetailMainInfoFragment
07-01 21:33:07.315: E/AndroidRuntime(10120): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:285)
07-01 21:33:07.315: E/AndroidRuntime(10120): at a
Alles anzeigen
Problem besteht bei einem Fragmentaustausch durch das selbe Fragment(aber eine neue Instanz). Das erste Fragment wird angezeigt, beim zweiten stürtzt er dann ab.
Vieles schon ausprobiert, aber nichts hat geholfen...
Aktuell:
Code
if (this.mTwoPane)
{
if (PupilDetail != null) {getSupportFragmentManager().beginTransaction().remove(PupilDetail).commit(); PupilDetail.onDestroy();} //Versuch von mir -> Klappt nicht (PupilDetail = Globale Variable)
Bundle bundle = new Bundle();
bundle.putString("item_id", paramString);
PupilDetail = new PupilDetailFragment();
PupilDetail.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.pupil_detail_container, PupilDetail).commit();
}
Vielen Dank schonmal