java.lang.IllegalStateException: Can't change container ID of fragment SupportMapFragment{16065ed1 id=0x3e8}: was 1000 now 2131296337

Appcelerator JIRA | Manuel Lehner | 2 years ago
  1. 0

    The issue title may be a little general but I'm not able to be more specific because this happens whenever the parent view of the mapview is a Fragment. You can easily reproduce this bug with this test code: {code:javascript} Ti.UI.createAlertDialog({ androidView: require('ti.map').createView() }).show(); {code} App crashes with this: {code} [ERROR] : TiApplication (main) [712,712] Sending event: exception on thread: main msg:android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8; Titanium 3.6.0,2014/12/11 14:51,7bde3b5 [ERROR] : TiApplication android.content.res.Resources$NotFoundException: Unable to find resource ID #0x3e8 [ERROR] : TiApplication at android.content.res.Resources.getResourceName(Resources.java:2026) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:939) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126) [ERROR] : TiApplication at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489) [ERROR] : TiApplication at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454) [ERROR] : TiApplication at android.os.Handler.handleCallback(Handler.java:739) [ERROR] : TiApplication at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication at android.os.Looper.loop(Looper.java:135) [ERROR] : TiApplication at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] : TiApplication at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] : TiApplication at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code} This not just happening with AlertDialogs, I've seen this error since a while here: https://github.com/manumaticx/Ti.DrawerLayout/issues/4 I think the cause for this is somewhere in [TiUIFragment|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java] as the FragmentManager fails to resolve the containers resource id. I've tested this with several Titanium versions (3.3.0 to 3.6.0).

    Appcelerator JIRA | 2 years ago | Manuel Lehner
    java.lang.IllegalStateException: Can't change container ID of fragment SupportMapFragment{16065ed1 id=0x3e8}: was 1000 now 2131296337
  2. 0

    Switching between Fragments in a single Activity

    Stack Overflow | 4 years ago | Niek Haarman
    java.lang.IllegalStateException: Can't change container ID of fragment SecondMenuFragment{405e2a70 #1 id=0x7f060029}: was 2131099689 now 2131099687
  3. 0

    Viewpager in a fragment

    Stack Overflow | 3 years ago | Stein
    java.lang.IllegalStateException: Can't change container ID of fragment InfoFragment{41a85050 #0 id=0x7f05005a android:switcher:2131034202:0}: was 2131034202 now 2131034203
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IllegalStateException: Can't change tag of fragment error when i use navigation drawer(slider menu)

    Stack Overflow | 1 year ago | shri
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.symtrac_loc.tr/com.novartis.symtrac.slider.MainActivity}: java.lang.IllegalStateException: Can't change tag of fragment FragmentSettings{433cf7e0 #2 id=0x7f0900fa SETTINGS}: was SETTINGS now HOME
  6. 0

    java.lang.IllegalStateException: Can't change tag of fragment error when i use navigation drawer(slider menu) | Tech Jaffa

    techjaffa.info | 11 months ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.symtrac_loc.tr/com.novartis.symtrac.slider.MainActivity}: java.lang.IllegalStateException: Can't change tag of fragment FragmentSettings{433cf7e0 #2 id=0x7f0900fa SETTINGS}: was SETTINGS now HOME

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Can't change container ID of fragment SupportMapFragment{16065ed1 id=0x3e8}: was 1000 now 2131296337

      at android.support.v4.app.BackStackRecord.doAddOp()
    2. Android Support v4
      BackStackRecord.replace
      1. android.support.v4.app.BackStackRecord.doAddOp(BackStackRecord.java:429)
      2. android.support.v4.app.BackStackRecord.replace(BackStackRecord.java:451)
      3. android.support.v4.app.BackStackRecord.replace(BackStackRecord.java:443)
      3 frames
    3. com.tripvi.drawerlayout
      Drawer.propertyChanged
      1. com.tripvi.drawerlayout.Drawer.replaceCenterView(Drawer.java:443)
      2. com.tripvi.drawerlayout.Drawer.propertyChanged(Drawer.java:602)
      2 frames
    4. org.appcelerator.kroll
      KrollProxy.handleMessage
      1. org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21)
      2. org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1083)
      2 frames
    5. org.appcelerator.titanium
      TiViewProxy.handleMessage
      1. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
      1 frame
    6. com.tripvi.drawerlayout
      DrawerProxy.handleMessage
      1. com.tripvi.drawerlayout.DrawerProxy.handleMessage(DrawerProxy.java:70)
      1 frame
    7. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:98)
      2. android.os.Looper.loop(Looper.java:135)
      3. android.app.ActivityThread.main(ActivityThread.java:5221)
      3 frames
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    9. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
      2 frames