Time for action – running the game in Android
Time to deploy the game to Android.
- Navigate to the
proj.android
folder and open the fileAndroidManifest.xml
in a text editor. Then go to the folderjni
and open the fileAndroid.mk
in a text editor. - In the
AndroidManifest.xml
file, edit the following line in theactivity
tag as follows:android:screenOrientation="portrait"
- Next, let's edit the make file, so open the
Android.mk
file and edit the lines inLOCAL_SRC_FILES
to read:LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/b2Sprite.cpp \ ../../Classes/Eskimo.cpp \ ../../Classes/GSwitch.cpp \ ../../Classes/Igloo.cpp \ ../../Classes/Platform.cpp \ ../../Classes/LevelSelectLayer.cpp \ ../../Classes/MenuLayer.cpp \ ../../Classes/GameLayer.cpp
- Now import the project into...