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 7563179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:35:57+00:00 2026-05-30T13:35:57+00:00

I have build an app in titanium studio and I have runned it both

  • 0

I have build an app in titanium studio and I have runned it both on iphone simulator and iphone device and it works perfectly. But when I try to run it on android emulator or android device it crashes.

I get the following error:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartcrew/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: call to getView on a Window
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651)
at android.widget.TabHost.setCurrentTab(TabHost.java:323)
at android.widget.TabHost.addTab(TabHost.java:213)
at ti.modules.titanium.ui.widget.TiUITabGroup.addTab(TiUITabGroup.java:69)
at ti.modules.titanium.ui.TabGroupProxy.addTabToGroup(TabGroupProxy.java:192)
at ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:275)
at ti.modules.titanium.ui.TabGroupProxy.handleMessage(TabGroupProxy.java:91)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.IllegalStateException: call to getView on a Window
at ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:63)
at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:384)
at ti.modules.titanium.ui.WindowProxy$1.windowCreated(WindowProxy.java:117)
at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:31)
at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:271)
at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:298)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

E/AndroidRuntime(  246): FATAL EXCEPTION: main
E/AndroidRuntime(  246): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartcrew/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: call to getView on a Window
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651)
at android.widget.TabHost.setCurrentTab(TabHost.java:323)
at android.widget.TabHost.addTab(TabHost.java:213)
at ti.modules.titanium.ui.widget.TiUITabGroup.addTab(TiUITabGroup.java:69)
at ti.modules.titanium.ui.TabGroupProxy.addTabToGroup(TabGroupProxy.java:192)
at ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:275)
at ti.modules.titanium.ui.TabGroupProxy.handleMessage(TabGroupProxy.java:91)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.IllegalStateException: call to getView on a Window
at ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:63)
at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:384)
at ti.modules.titanium.ui.WindowProxy$1.windowCreated(WindowProxy.java:117)
at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:31)
at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:271)
at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:298)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

Has anyone any idea about what is wrong? I would post some code, but is too long and I don’t know which part causes this problem.

Wait for your answers, thank you!

  • 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-05-30T13:35:59+00:00Added an answer on May 30, 2026 at 1:35 pm
    // this sets the background color of the master UIView (when there are no windows/tab groups on it)
    
    
    //Ti.include('Window1.js');
    Titanium.UI.setBackgroundColor('#000');
    
    // create tab group
    
    
    var placeHolders = [{left:10, top:10, width:20, height:20, bgColor:"#FFF", bgAlpha:0.5, img:""},
                        {left:30, top:20, width:50, height:50, bgColor:Math.random * 0xFFFFFF, bgAlpha:0.5, img:""},
                        {left:60, top:60, width:20, height:20, bgColor:Math.random * 0xFFFFFF, bgAlpha:0.5, img:""},
                        {left:100, top:20, width:20, height:20, bgColor:Math.random * 0xFFFFFF, bgAlpha:0.5, img:""},
                        {left:50, top:100, width:20, height:20, bgColor:Math.random * 0xFFFFFF, bgAlpha:0.5, img:""}
                        ];
    
    
    var tabGroup = Titanium.UI.createTabGroup();
    
    
    
    
    
    var parentWindow = Titanium.UI.createWindow({  
        title:'Tab 1',
        backgroundImage:"assets/background.png",
        backgroundColor:'#fff',
        navBarHidden:true,
        tabBarHidden:true
    });
    addPlaceHolders();
    
    function addPlaceHolders()
    {
        for(i = 0; i < placeHolders.length; i++)
        {
            var placeHolder = placeHolders[i];
            var placeHolderView = Titanium.UI.createView({
                top:placeHolder.top,
                left:placeHolder.left,
                height:placeHolder.height,
                width:placeHolder.width,
                backgroundColor:placeHolder.bgColor,
                opacity:placeHolder.bgAlpha
    
            });
            placeHolderView.name = i;
            parentWindow.add(placeHolderView);
            placeHolderView.addEventListener("click", onPlaceHolderClick);
        }
    }
    
    
    var main = Titanium.UI.createTab({  
        title:'Tab 1',
        window:parentWindow
    });
    //  add tabs
    tabGroup.addTab(main);  
    
    // open tab group
    tabGroup.open();
    
    function onPlaceHolderClick(e)
    {
        //tell me wot to do here
        alert("tell me wo to do here");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Titanium app and have build a function to run sqlite
I've built my app with Titanium Appcelerator. I can build and run my app
Hope this makes sense, I am using Titanium mobile to build an iPhone app.
I am developing an application using titanium mobile. On the simulator, the app works
i have build a small test app in Flash Pro 5.5 overlayed with the
I have to build small (for now) admin app in Silverlight2, and would like
I'm trying to build an app where I have a TabBarController with 4 entries.
I am working with sencha to build mobile app. I have created one page
I have dev cert and distibution cert. I am able to build an app
I'm using CodeIgniter (a PHP framework) to build an app, and I have an

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.