1

I've struggled with referencing errors to AndEngine GLES2 for hours. I've followed this guide, http://jimmaru.wordpress.com/2012/04/23/setting-up-andengine-gles2-0/ and somehow I could compile the AndEngine (at least, there are no errors, though there are 33 warnings), but when I refer to it from an android application which I downloaded from https://github.com/nicolasgramlich/AndEngineExamples produces bunch of errors saying "java: package org.andengine.engine.camera does not exist" or such (the messages are in Japanese, so it might be slightly different) Please see the attached picture.

enter image description here

What I did so far
AndEngine

  • Project Structure - Project Settings - Project - Change Project SDK to "Android 4.2 Platform"
  • Project Structure - Project Settings - Modules - Dependencies - Change Module SDK to "Android 4.2 Platform"
  • Project Structure - Project Settings - Facets - Check "Library module"

AndEngineExample

  • Project Structure - Project Settings - Project - Change Project SDK to "Android 4.2 Platform"
  • Project Structure - Project Settings - Libraries - Add "AndEngine" (Classes and Sources)
  • Project Structure - Project Settings - Modules - Dependencies - Change Module SDK to "Android 4.2 Platform"

My environment is the following.
Windows 7 Home Premium 64bit
IntelliJ IDEA 12.04 CE
java version 1.7.0

I'm pretty much new to Java and Android world, so any help would be appreciated!

Alexey
  • 714
  • 8
  • 21
Yoo Matsuo
  • 2,361
  • 2
  • 28
  • 41
  • 1
    AndEngine should be configured as a module (with **library module** option enabled in Android facet), not as a plain Java library. See the related question regarding [configuring Facebook SDK](http://stackoverflow.com/q/7262221/104891). – CrazyCoder Feb 21 '13 at 12:43
  • That worked, thanks a lot! Although I still have some errors with AndEngineExample, I could successfully compile with another android app. Please post your comment as an answer, I'll check it the answer. – Yoo Matsuo Feb 21 '13 at 13:12
  • Directly to the AndEngine to add to the project: [referring project library in intellij idea (using AndEngine in Intellij IDEA)][1] [1]: http://stackoverflow.com/questions/12332869/referring-project-library-in-intellij-idea – ozbilgic Mar 15 '14 at 14:03

2 Answers2

1

AndEngine should be configured as a module (with library module option enabled in Android facet), not as a plain Java library.

See the related question: Add facebook SDK to IntelliJ Android project?

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
0

You need to follow the tutorial on mybringback.com it will explain in depth of what is going on and help fix those errors. mybringback.com First off there is a difference if your using GLES1 and GLES2. The JAVA compiler needs to be placed at 16. The library module must be imported and referenced as such or they can't be used. He will put it into really broken down vids.

mr.j05hua
  • 170
  • 4
  • 14