java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public

Appcelerator JIRA | Bar Bruy | 3 years ago
  1. 0

    [TIMOB-17016] Android: Closing Window and returning to TabGroup crashes app with "Unable to instantiate fragment" - Appcelerator JIRA

    appcelerator.org | 6 months ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
  2. 0

    When a window is closed and returns to a tabgroup, the app crashes. "Unfortunately, YourApp has stopped." {color:red} [ERROR] : TiApplication: Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor {color} To simulate the error run the code below + Developer options -> Enable "Don't keep activities" (Or open plenty of apps in the background) {code} var tabWin1 = Ti.UI.createWindow({title : 'TW1'}); var tabWin2 = Ti.UI.createWindow({title : 'TW2'}); var tab1 = Ti.UI.createTab({window : tabWin1,title : 'Tab 1'}); var tab2 = Ti.UI.createTab({window : tabWin2,title : 'Tab 2'}); var tabGroup = Ti.UI.createTabGroup({tabs : [tab1,tab2]}); var win2 = Ti.UI.createWindow({title: 'Window 2'}); var openWindowButton = Ti.UI.createButton({widht:Ti.UI.SIZE,height:Ti.UI.SIZE,title:'Open window2'}); tabWin1.add(openWindowButton); var closeWindowButton = Ti.UI.createButton({widht:Ti.UI.SIZE,height:Ti.UI.SIZE,title:'Close window2'}); win2.add(closeWindowButton); openWindowButton.addEventListener('click',function(e){win2.open();}); closeWindowButton.addEventListener('click',function(e){win2.close();}); tabGroup.open(); {code} __FULL_ERROR___ {color:red} [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4d48b20) [ERROR] : TiApplication: (main) [7830,7830] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public; Titanium 3.2.3,2014/04/22 10:17,b958a70 [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) [ERROR] : TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:135) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5017) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) [ERROR] : TiApplication: Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: at android.app.Fragment.instantiate(Fragment.java:601) [ERROR] : TiApplication: at android.app.FragmentState.instantiate(Fragment.java:98) [ERROR] : TiApplication: at android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1759) [ERROR] : TiApplication: at android.app.Activity.onCreate(Activity.java:899) [ERROR] : TiApplication: at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:204) [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5231) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) [ERROR] : TiApplication: ... 11 more [ERROR] : TiApplication: Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor [ERROR] : TiApplication: at java.lang.Class.newInstanceImpl(Native Method) [ERROR] : TiApplication: at java.lang.Class.newInstance(Class.java:1208) [ERROR] : TiApplication: at android.app.Fragment.instantiate(Fragment.java:590) [ERROR] : TiApplication: ... 20 more [INFO] : Process: Sending signal. PID: 1446 SIG: 9 {color}

    Appcelerator JIRA | 3 years ago | Bar Bruy
    java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
  3. 0

    When a window is closed and returns to a tabgroup, the app crashes. "Unfortunately, YourApp has stopped." {color:red} [ERROR] : TiApplication: Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor {color} To simulate the error run the code below + Developer options -> Enable "Don't keep activities" (Or open plenty of apps in the background) {code} var tabWin1 = Ti.UI.createWindow({title : 'TW1'}); var tabWin2 = Ti.UI.createWindow({title : 'TW2'}); var tab1 = Ti.UI.createTab({window : tabWin1,title : 'Tab 1'}); var tab2 = Ti.UI.createTab({window : tabWin2,title : 'Tab 2'}); var tabGroup = Ti.UI.createTabGroup({tabs : [tab1,tab2]}); var win2 = Ti.UI.createWindow({title: 'Window 2'}); var openWindowButton = Ti.UI.createButton({widht:Ti.UI.SIZE,height:Ti.UI.SIZE,title:'Open window2'}); tabWin1.add(openWindowButton); var closeWindowButton = Ti.UI.createButton({widht:Ti.UI.SIZE,height:Ti.UI.SIZE,title:'Close window2'}); win2.add(closeWindowButton); openWindowButton.addEventListener('click',function(e){win2.open();}); closeWindowButton.addEventListener('click',function(e){win2.close();}); tabGroup.open(); {code} __FULL_ERROR___ {color:red} [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4d48b20) [ERROR] : TiApplication: (main) [7830,7830] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public; Titanium 3.2.3,2014/04/22 10:17,b958a70 [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) [ERROR] : TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:135) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5017) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) [ERROR] : TiApplication: Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public [ERROR] : TiApplication: at android.app.Fragment.instantiate(Fragment.java:601) [ERROR] : TiApplication: at android.app.FragmentState.instantiate(Fragment.java:98) [ERROR] : TiApplication: at android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1759) [ERROR] : TiApplication: at android.app.Activity.onCreate(Activity.java:899) [ERROR] : TiApplication: at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:204) [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5231) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) [ERROR] : TiApplication: ... 11 more [ERROR] : TiApplication: Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor [ERROR] : TiApplication: at java.lang.Class.newInstanceImpl(Native Method) [ERROR] : TiApplication: at java.lang.Class.newInstance(Class.java:1208) [ERROR] : TiApplication: at android.app.Fragment.instantiate(Fragment.java:590) [ERROR] : TiApplication: ... 20 more [INFO] : Process: Sending signal. PID: 1446 SIG: 9 {color}

    Appcelerator JIRA | 3 years ago | Bar Bruy
    java.lang.RuntimeException: Unable to start activity ComponentInfo{test.geny.com/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    This is a regression on 3.2.3.GA. The issue does not happen on 3.2.2.GA. To reproduce: 1. Turn on the developer option "do not keep activities". 2. Run KS. 3. Click any test, eg "Slider". 4. Click the BACK button. Expected behavior: the app is closed without crash. Actual behavior: the app crashes. Here is the crash log: {code} E/TiApplication( 1172): (main) [13,29380] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.kitchensink/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public; Titanium 3.2.3,2014/04/22 10:17,b958a70 E/TiApplication( 1172): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.kitchensink/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public E/TiApplication( 1172): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) E/TiApplication( 1172): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) E/TiApplication( 1172): at android.app.ActivityThread.access$600(ActivityThread.java:123) E/TiApplication( 1172): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) E/TiApplication( 1172): at android.os.Handler.dispatchMessage(Handler.java:99) E/TiApplication( 1172): at android.os.Looper.loop(Looper.java:137) E/TiApplication( 1172): at android.app.ActivityThread.main(ActivityThread.java:4424) E/TiApplication( 1172): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication( 1172): at java.lang.reflect.Method.invoke(Method.java:511) E/TiApplication( 1172): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) E/TiApplication( 1172): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) E/TiApplication( 1172): at dalvik.system.NativeStart.main(Native Method) E/TiApplication( 1172): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public E/TiApplication( 1172): at android.app.Fragment.instantiate(Fragment.java:585) E/TiApplication( 1172): at android.app.FragmentState.instantiate(Fragment.java:96) E/TiApplication( 1172): at android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1682) E/TiApplication( 1172): at android.app.Activity.onCreate(Activity.java:861) E/TiApplication( 1172): at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:204) E/TiApplication( 1172): at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520) E/TiApplication( 1172): at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) E/TiApplication( 1172): at android.app.Activity.performCreate(Activity.java:4465) E/TiApplication( 1172): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) E/TiApplication( 1172): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) E/TiApplication( 1172): ... 11 more E/TiApplication( 1172): Caused by: java.lang.InstantiationException: can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor E/TiApplication( 1172): at java.lang.Class.newInstanceImpl(Native Method) E/TiApplication( 1172): at java.lang.Class.newInstance(Class.java:1319) E/TiApplication( 1172): at android.app.Fragment.instantiate(Fragment.java:574) E/TiApplication( 1172): ... 20 more {code}

    Appcelerator JIRA | 2 years ago | Ping Wang
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.kitchensink/org.appcelerator.titanium.TiActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment: make sure class name exists, is public, and has an empty constructor that is public
  6. 0

    [Crash Log] Sun, 09 Nov 2014 05:24:41 GMT

    GitHub | 2 years ago | blFeedbackBot
    java.lang.RuntimeException: Unable to start activity ComponentInfo{us.shandian.blacklight/us.shandian.blacklight.ui.statuses.UserTimeLineActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment us.shandian.blacklight.ui.statuses.UserTimeLineFragment: make sure class name exists, is public, and has an empty constructor that is public
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.InstantiationException

    can't instantiate class ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment; no empty constructor

    at java.lang.Class.newInstanceImpl()
  2. Java RT
    Class.newInstance
    1. java.lang.Class.newInstanceImpl(Native Method)
    2. java.lang.Class.newInstance(Class.java:1208)
    2 frames
  3. Android Platform
    Activity.onCreate
    1. android.app.Fragment.instantiate(Fragment.java:590)
    2. android.app.FragmentState.instantiate(Fragment.java:98)
    3. android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1759)
    4. android.app.Activity.onCreate(Activity.java:899)
    4 frames
  4. Android Support v4
    FragmentActivity.onCreate
    1. android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:204)
    1 frame
  5. org.appcelerator.titanium
    TiActivity.onCreate
    1. org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520)
    2. org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
    2 frames
  6. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:5231)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    5. android.app.ActivityThread.access$800(ActivityThread.java:135)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    7. android.os.Handler.dispatchMessage(Handler.java:102)
    8. android.os.Looper.loop(Looper.java:136)
    9. android.app.ActivityThread.main(ActivityThread.java:5017)
    9 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  8. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    2 frames
  9. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame