Built HelloWorld App; No Errors; But Can't get it to run in Simulator
I downloaded and built the HelloWorld App (finally got it to build without errors after a lot of effort).
But when I try to "Run" it using the simulator, it never appears in the device's home screen. I did create an icon (80x80) and assign it to the project and set it to position 1 on the home screen. I'm lost. |
What simulator are you using?
Did you check the "downloads" folder? Did you make your project "Active" (only the active project is copied to the simulator). |
Quote:
No--I didn't realize I needed to make it "active". I just did and the errors are back. I guess it wasn't compiling after all. This is what I get when it does try to build.... Quote:
|
Sounds like you app does not have a public main() routine?
|
Quote:
Code:
/** |
Create a new project and use the following code. Initially, set a breakpoint on the first statement HelloWorld theApp = new HelloWorld(); and debug the application. Also avoid using image at the first go.
Code:
/** |
Thanks--when I did that, a dialog box popped up that had the following message.
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Thanks, Pritesh |
This behavior occurs when some files of the same or different workspace, related to applications loaded in the simulator, are either relocated or deleted. You just need to click "Don't ask again" to proceed further. This wont affect the functionality of the "Hello World" app, neither on the simulator nor on the real device.
|
Thanks all. But still no good. I thought maybe the installation was corrupted somehow so I completely uninstalled Eclipse, Java--all the stuff related to BB development that I had installed and then reinstalled everything from scratch.
When I try to debug the code that sahil_khanna posted, I get the error messages that I previously posted. If I do press "don't ask", it eventually just tells me that it "Some debug information is missing. Not all applications may be debuggable." Then as I was writing this, I noticed that all of the files it previously said it had trouble loading had the word "debug" in them. Then it finishes loading the simulator. But HelloWorld never shows up anywhere on the simulated BB. So I closed the simulator and tried again--this time RUNNING it instead of DEBUGGING. But even though HelloWorld still doesn't show up on the BB, there are no error messages in Eclipse. |
When you say "doesn't show up in the simulator" - do you mean you can't find the app icon, or that when you run it nothing happens?
One other idea is to switch simulators Run -> Run Configurations... -> Simulator tab -> Profile Dropdown: choose something different -> Apply,Run |
Quote:
Quote:
Title = "API Failure (DE372)" Message = "API Mismatch Apps: 115, OS: 96.0)" And the simulator shuts down. |
1 Attachment(s)
I ran it with the debug option and copy/pasted everything from the Output window. That output is attached. Can someone PLEASE take a look and help me decipher this?
Thanks. |
Had a look at the dump, but I'm not that experienced. Somewhat similar to what I see, though I don't get the "...who has NO tunnels open - defocus NOT called" message. I don't know if that's significant.
One other idea is to try and open it from the simulator directly - you can launch a simulator if you can find the path, eg: C:\Program Files (x86)\Research In Motion\BlackBerry Smartphone Simulators 4.6.0\4.6.0.267 (8220-OrangeFR)\8220-OrangeFR.bat File -> Load Java Program... ... and then choose your hello world .cod file |
Thanks all!
Still not sure what was wrong, but I started over again with a new workspace and new source files. It now builds and shows up in the simulator--AND I CAN RUN THE APP IN THE SIMULATOR TOO! Now to start working on some real apps! |
All times are GMT -5. The time now is 04:54 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.