1

I have a persistent problem with not being able to correctly add .jar files to my build path. I have tried 3 methods for adding the .jar file to the library:

  1. Moving the .jar file to a subfolder called either "lib" or "libs" (I have tried both) in the main project folder, and then right clicking --> Build Path --> Add to build path.

  2. Right clicking on the project folder and adding the internal .jar file

  3. Doing the same thing, but adding the .jar file externally.

From here, the AndEngine library appears under the "Referenced Libraries" subgroup (It's the only thing in there), and I can open up the AndEngine library to find all the superclasses I'm supposed to be extending. The IDE just doesn't recognize any of them when I try to call them in my code.

Here's a video version of my problem.

http://www.andengine.org/blog/tag/tutorial/

I am able to follow the video up to about 1:50, when he changes the name of the extended class from "Activity" to "BaseGameActivity". He is actually able to do it with intellisense, and eclipse automatically added the correct import statement to the top. It won't do this for me.

The andengine jar file is sitting in my referenced libraries tab for this project. The IDE doesn't seem to recognize anything that's in it, including the above BaseGameActivity statement. (The correct import option selected in the video isn't even available to me).

I can go through and manually add the import statements that are needed, and that resolves the problems one by one. Doing so means that I have to expand the AndEngine.jar and go digging through all the subdivisions one-by-one looking for the name of the class I want to import. How can I fix this.

4

0 回答 0