I'm having a problem when editing the demos or trying to use the
library. I'm using Maven and Eclipse. Everything (ie. the showcase
demo) compiles and runs fine and I've been able to build and run as
both Java and HTML5. In general, I followed the Getting Started guide.
It might also be worth mentioning I'm quite new with both Maven and
Eclipse, but an quite experienced developer in general. Just different
languages and platforms.
Anyways, it seems to me Eclipse or Maven isn't able to dig into the
references and expand the code completion and I'm sure this is a
Eclipse/Maven problem and not with the library itself. I've done some
searching online and tried understand/solve the problem myself, but at
no avail.
This code will compile just fine, however while typing
assetManager()., graphics(). etc will throw off the message "This
compilation unit is not on the build path of a Java project."
public void init() {
// create and add background image layer
Image bgImage = assetManager().getImage("images/bg.png");
ImageLayer bgLayer = graphics().createImageLayer(bgImage);
graphics().rootLayer().add(bgLayer);
}
Any suggestions on how to resolve this?
Try mvn eclipse:eclipse to regenerate settings for your eclipse
project, might help.
I created a project called "footest" and the following were created:
- footest
- footest-android
- footest-core
- footest-html
- footest-java
I went on trying to code in footest, and not the footest-core (subdir
src/main/java) which contains - as expected - the proper references.
I'm guessing this is the right place to do the work. Everything seems
to be working as it should. Java, Eclipse, Maven and the sorts isn't
exactly my daily development environment I'm not quite sure what's
what yet. Now I'm off spending a significant amount of time reading up
some documentation.
Thanks again!