Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
minderaser
Posts: 8
Registered: ‎02-05-2012
My Device: Playbook
Accepted Solution

IDE cannot find simulator

First off, the IDE can find my Playbook just fine, but it cannot find the simulator. I have tried different combinations of starting the simulator and IDE (in terms of order) as well as restarting my computer.

 

In the debug configurations target auto discovery does not find the simulator. I have tried manually entering the IP and development IP from the simulator as well but the IDE still cannot find it.

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: IDE cannot find simulator

Do you have any firewall or VPN software running that could be blocking communication between the BlackBerry NDK and simulator?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
minderaser
Posts: 8
Registered: ‎02-05-2012
My Device: Playbook

Re: IDE cannot find simulator

[ Edited ]

Hi, I do not have any VPN or firewall (or antivirus) software installed. Windows firewall is diabled. This is because I just recently in fact reinstalled Windows on this machine.

 

At any rate, I have solved my problem. I executed the blackberry-deploy script from the command line and discovered that Java was not in the PATH variable, so I added it. Now I was able to get blackberry-deploy to install the app from the command line successfully in the simulator. The IDE was still unable to auto-discover the device, but by creating the debug configuration with the target IP the IP in the simulator, I clicked through the error messages stating that it could not connect, hit the apply and OK buttons, and then in the project view lo and behold the error icon next to the simulator disappeared and I was able to debug happily from the IDE from there!

 

Thanks for your post, "blocking communication" made me wonder if the IDE was having trouble communicating with blackberry-deploy.

 

LESSON LEARNED: Make sure Java is in your PATH variable!

 

edit:

You know it is confusing to me how it was able to deploy to the device just fine, because I imagine that uses the same blackberry-deploy. Maybe it called a path/to/java instead of just "java" when deploying to the device, or maybe I'm going insane, or maybe the IDE just needs a gentle touch and randomly felt like working (and so maybe having Java in the PATH variable was not really the fix to this problem; I cannot say for sure)

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: IDE cannot find simulator

Thanks for your followup message.  I'm going to send this to our development team to improve on this type of configuration issue.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: IDE cannot find simulator

What OS are you using?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
minderaser
Posts: 8
Registered: ‎02-05-2012
My Device: Playbook

Re: IDE cannot find simulator

[ Edited ]

I am using Windows 7 64 bit (Home Premium), and installed the 32 bit Java 7 update 3 JDK which didn't appear to automatically set the PATH variables.

 

Again I can't say for sure that this was necessarily an issue with Java being in the PATH; I just happened to notice a correlation with updating Java to be in my PATH and the IDE being able to connect to the simulator. Even so, it still cannot autodetect the simulator. Both simulator and NDK are for OS 2.0.1.

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: IDE cannot find simulator

Thanks for the info.  There are dependancies on Java, but in most cases it should make use of the JRE packaged with the NDK.  I'll dig into this a bit further and see how we can make this easier in the future.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
HuXu77
Posts: 196
Registered: ‎02-10-2011
My Device: Playbook 16GB and Z10

Re: IDE cannot find simulator

[ Edited ]

Could you clearify what the exact path is you set?  I have the Java folder, but in it is jre6 and in there is lib and bin, what is the path you added?

 

EDIT: Actually my problem was I wasn't building correctly, I needed to build for Simulator-Debug not default. ha silly mistake.

_________________________________________________
Apps
Go Music
Flashlight Fast Free/Pro
Fitbit for BlackBerry PlayBook