I 've been reading AndEngine recently. I 'd like to summarize some notes!
In fact, the configuration of AndEngine is better configured than Libgdx (another game engine under Android! The only trouble is to import various extensions when configuring AndEngineExamples!
The detailed steps are as follows:
1. Download The AndEngine source code from git. You need 8 extensions to learn how to use AndEngineExamples (no documentation, so take this as an API Demo !)
Git repository root address: AndEngine git repository https://github.com/nicolasgramlich
Okay, let me write more details...
AndEngine source code: Click to open the link https://github.com/nicolasgramlich/AndEngine
AndEngineExamples: click open link https://github.com/nicolasgramlich/AndEngineExamples
The following are the eight needed extension packages, including the magic Box2d, which are ranked in no particular order...
AndEngineLiveWallpaperExtension: click open link https://github.com/nicolasgramlich/AndEngineLiveWallpaperExtension
AndEngineTexturePackerExtension: click open link https://github.com/nicolasgramlich/AndEngineTexturePackerExtension
AndEngineTMXTiledMapExtension: click open link https://github.com/nicolasgramlich/AndEngineTMXTiledMapExtension
AndEngineMultiplayerExtension: click open link https://github.com/nicolasgramlich/AndEngineMultiplayerExtension
AndEnginePhysicsBox2DExtension: click open link https://github.com/nicolasgramlich/AndEnginePhysicsBox2DExtension
AndEngineSVGTextureRegionExtension: click open link https://github.com/nicolasgramlich/AndEngineSVGTextureRegionExtension
AndEngineMODPlayerExtension: click open link https://github.com/nicolasgramlich/AndEngineMODPlayerExtension
AndEngineAugmentedRealityExtension: click open link https://github.com/nicolasgramlich/AndEngineAugmentedRealityExtension
PS: If git won't be used, Google...
PS2: git hub is constantly updated code, if you want to consider supporting more models, such as less than 2.1, go to google code download, click open link http://code.google.com/p/andengine/
2. After the download is complete, import all the eclipse files and compile the files.
A. when compiling the AndEngine project, android: targetSdkVersion should preferably be greater than 8. It is better to have an sdk later than 2.3 because the engine has the code to judge the current version. If the sdk is not enough, an error occurs during compilation! My gorgeous choice is 4.0, no pressure!
(Ps: targetSdkVersion, not android: minSdkVersion. You can leave a low profile !)
(Ps2: the version in project. properties is the same as that in targetSdkVersion)
B. Compile 8 extension packages, and set target = android-15 in project. properties of each project... This is very embarrassing. You need to manually change it to the highest version of your sdk, for example, 14 (corresponding to android 4.0). If an error is reported, you can check the error location, it is estimated that all the errors occur when importing the AndEngine package. That is to say, some expansion packages require the support of AndEngine. Right-click the extension package project and choose Build Path> Configure Build Path. After opening the panel, select Add jar and find AndEngine under the bin directory of the andengine project. import the jar package!
For 8 extension packages, you must follow the above steps to configure!
3. You can use the AndEngine engine After configuring both the AndEngine and the extension package. But if you want to learn the official demo, You need to import AndengineExamples.
(There may be a red exclamation mark after the import, mainly due to the problem of the associated database)
A. Follow the steps 2-B to import all the AndEngine. jar files under the bin directory of the andengine project and the. jar packages under the bin directory of the eight extension projects.
B. Copy the libs directory of the AndEngine project to AndEngineExamples (the c/c ++ library that jni needs to call)
As long as you follow the three steps above, it will basically be okay!
Good examples and source code!
From the oneRain88 Column