views:

43

answers:

2

I've already written a game engine in java using eclipse and opengl es, I had one project (an android project) which contained both of my packages

com.logic.engine
com.logic.testapp

I wanted a way to keep my engine and test app seperate, I've made an earlier post about how this is done, and I figured out how to reference one project in the build path of another (or just creating a jar file).

My problem is that, lets say I now have my engine all wrapped up in an android project com.logic.engine, and now someone would like to use this engine to create a game, so they create an android project com.someclient.game, well now because we have one android project referencing another, it crashes everytime.

Now obviously i need the android sdk in my engine package in order to reference things, but its also required on the client app, since the activity is what is actually being run by android.

I guess my question is, how can i create a project for my game engine without it being an android project, but still referencing the android sdk, and without causing it to crash the client app using it?

edit:

note: the client app utilizes the engine flawlessly when its in the same project folder, it isn't until the engine is referenced from another project containing the android sdk that it crashes, so im 99.9% positive it has nothing to do with my code

A: 

Use an Android library project.

CommonsWare
A: 

Your game engine project should be an Android library project. See Working with library projects.

Mayra
Thank you, very simple solution, this is exactly what i needed :)
SilverLogic