Follow these steps to deploy a Box2D game to Android:
Open the
Android.mk
file in a text editor (you'll find it in the folderproj.android/jni
).Edit the lines in
LOCAL_SRC_FILES
to read:LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/GLES-Render.cpp \ ../../Classes/b2Sprite.cpp \ ../../Classes/Ball.cpp \ ../../Classes/CollisionListener.cpp \ ../../Classes/Cue.cpp \ ../../Classes/LineContainer.cpp \ ../../Classes/GameLayer.cpp
Open the manifest file and set the app orientation to
portrait
.Import the game into Eclipse and wait till all classes are compiled.
Build and run your application.