Eclipse Project Files

Monkey Forums/Monkey Beginners/Eclipse Project Files

erebel55(Posted 2014) [#1]
Very noob question, does Monkey generate any Eclipse project files when I compile as Android?

If so, what are there extensions and where can I find them?


Volker(Posted 2014) [#2]
Monkey creates .java files.
You can find them in your build folder under android/src/com ...


erebel55(Posted 2014) [#3]
Yep I found those, okay so I have to create a new Eclipse project using those. Sorry, for ios you just open up the xcode project; was expecting the same for android.

I guess it probably doesn't create the project files, because there are multiple IDEs you can use for android.


dawlane(Posted 2014) [#4]
You should be able to import a directory as a Eclipse project via the Project explorer.


erebel55(Posted 2014) [#5]
Can you be a little more specific? I'm new to Eclipse. Or just provide a screenshot.


dawlane(Posted 2014) [#6]
First thing you need to do is install the Eclipse ADT and of course the android sdk needs to be on your system.
As Eclipse can use an number of plugins for different programming languages and environments; each environment is know as a perspective.
The perspective commonly used for android is Java (default).

You have two ways to import a project if a perspective is not open. You cannot use New from the file menu until you have an open perspective.

1) Open a perspective Window->Open perspective->Other. This will open a dialog where you can select which perspective to use. There are two for Android Java(default) and DDMS (a debug device manager if I remember) .

After the perspective is open, there should be a tab that says Package Explorer (note in other perspectives this is called by different names, but it basically just points to the Eclipse workspace directory and will list all projects regardless of perspective type).
Right click on Package Explorer and it will open a import dialog box.

Use the Select an import source filter box and type Android and select the Android folder in the list box below. Select Existing Android Code into Workspace and click the next button.

The next dialog asks for the Root Directory use this to navigate to the monkey android folder in the projects .build directory. After selection, in the list box below you will see two items to import. Click the check box for the item you wish to import; you don't have to import the template item.

You can change the name of a project by just clicking on the items New Project Name (default would be MonkeyGame). Note you cannot have two projects with the same name.

2) Use the application menu File->Import and follow the above for importing.

Before you can run and application you will need to have either a real device (research this on how to set it up) or a AVD (Android Virtual Device) set up.

When you first try and run the selected project; a dialog is shown on how you wish it to be run. Select Run As Android Application.


erebel55(Posted 2014) [#7]
Thanks :) I got it all working, just getting horrible fps with the AVD, so will need to mess around with that.


Desperado(Posted 2014) [#8]
You can install Intel's HAXM to dramatically speedup the AVD emulator. Note if you are using OS X 10.9 or Windows 8.1, you'll also need to install the hotfix.

Also make sure you have the "Use Host GPU" option checked.

Plus you might have to patch mojo.android.java (located under monkey/modules/mojo/native) with a small change to GLES11.glBufferData calls as described in this thread. I had to do that before I could get any Monkey app to run in the emulator without immediately crashing. The thread also mentions alternate emulators you could try (though I've had the best luck with Google's emulator and HAXM).