Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Is the problem my code or titanium?

I am trying to build the demo, walk through app, here is my code:
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var winObj = Titanium.UI.createWindow({backgroundColor : 'blue'});
var viewObj = Titanium.UI.createView({borderRadius : 10,
backgroundColor: 'gray',
borderColor: 'Black',
width:200,
height:150});
var username = Titanium.UI.createTextFrield({width:150,
height:35,
top:10,
borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
hintText: 'Username'});
viewObj.add(username);
var password = Titanium.UI.createTextField({width:150,
height:35,
top:55,
borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
passwordMask:true,
hintText:'Password'});
viewObj.add(password);
var button = Titanium.UI.createButton({title:'Login',
width:150,
height:40,
top:100});
viewObj.add(button);
winObj.add(viewObj);
winObj.open();

The emulator launches fine but after
[INFO] Manifest unchanged, skipping Java build

I get this error:
[ERROR] C:MobileAndroidandroid-sdk_r06-windowsandroid-sdk-windowsplatformsandroid-4toolsaapt.exe (skipping index file 'C:Documents and SettingstruuserDesktopProjectsFundamentals_wt1buildandroidbinassetsResourcesThumbs.db')

then it continues to
[INFO] Installing application on device

and in the emulator I get
Runtime error
location [13,0] app://app.js

Message:
Wrapped java.lang.NullPointerException(app://app.js#13)

so what am I doing wrong? Is the problem my code or my install?

— asked May 21st 2010 by Lea Baxter
0 Comments

2 Answers

  • PS, I'm running this on Windows XP-SP3

    and I'm confident my install was done correctly, and I've created 2 additional files and all give me this same error. Yet when I just create a new project and don't manipulate the code it works fine?

    — answered May 21st 2010 by Lea Baxter
    permalink
    0 Comments
  • Edit your post to include code formatting. The correct syntax is three tilde's (~), then your code, then three more tilde's. Otherwise I can't read your code.

    However, I think your problem is in the installation/configuration and not your code.

    — answered May 22nd 2010 by Ryan Gartin
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.