Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kb1972
Visitor

How to open examples in eclipse

I'd like to get started with running and manipulating the SDK example apps, but I'm not sure how to open them in Eclipse.

I figured that if I set my eclipse workspace to RokuSDK\examples\source, they might automagically show up in the Eclipse project explorer. No luck.
So then I figured that from my existing workspace I could Import...Existing Project, but that only finds the ecp_client\android_remote project, nothing else.
From the File...Open command, I can open an individual .brs file, but I want to open an entire example project so I can deploy and debug it.

What am I doing wrong?
0 Kudos
1 REPLY 1
malloys
Visitor

Re: How to open examples in eclipse

In order for Eclipse to see a group of files as a project, at some point an associated Eclipse .project file had to have been created.
With the exception of the ecp_client project, the example projects in the Roku SDK zipfile (not the ones embedded in the BrightScript plugin) do not have the requisite .project file.

On a related side note - if you have already installed the BrightScript plugin, the BrightScript new project wizard has a sub-set of the SDK example projects built-in and they are selectable from the project templates drop-down list.

In any case, if you want to import any of the SDK examples into eclipse from the filesystem, you can do the following:

a) Install the BrightScript plugin
b) Open the BrightScript perspective ( Window->Open Perspective->Other->BrightScript )
c) Create a new Brightscript project using the BrightScript new project wizard ( File->New BrightScript Project ), selecting no project template from the drop-down (assuming you are interested in an example that is not one of the projects in the templates list).
d) Right-click the newly created project in the project explorer window, and select "Import..."
e) Select either the General->Archive File or General->File System
f) Browse the file system to select the .zip file or the directory of the project you want to import.
g) Select the "Overwrite existing resources without warning" dialog option (or select the "Yes To All" if you click the Finish button too soon).

You can safely ignore any build errors during the import (there's a race condition that sometimes causes an erroneous build error on the first automatic build).


Cheers
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.