Android Development Issues
Super new at this. I've been scouring this "forum" and have found a few people with the same issues, but no solutions. First of all, I can't get the KitchenSink app to run. It sticks at "Detected tiapp.xml change, forcing full re-build…" and just stays there. SDK 2.2, and using Titanium 1.2.1.
Second, I can't get a simple button click event to fire. Here's the code I have for that…
//
// Create Alert Dialog
//
var alertDialog = Titanium.UI.Android.createAlertDialog({
title: 'Alert!',
message: 'You have an alert!',
buttonNames: ['OK','Cancel']
});
//
// create Button
//
var buttonMain = Titanium.UI.createButton({
title: "Click me!",
top:10,
left:10,
width:100,
height:50,
selectedColor:"Navy"
});
buttonMain.addEventListener("click",function(e){
//subView.show();
alertDialog.show();
});
winMain.add(buttonMain)
Any help or direction would be appreciated.
-MJC
2 Answers
-
Have you tried alertDialog.show? Not sure why you're prefixing your call with win.
Without Trace level logs we won't be able to guide you on KS. You may want to open that up as a separate question.
-
If you are able to create and run new Android applications, you should be able to copy the resources from the Kitchen Sink into a newly created mobile project.