Follow these steps to deploy the game to Android:
This time, there is no need to alter the manifest because the default settings are the ones we want. So, navigate to
proj.android
and then to thejni
folder and open theAndroid.mk
file in a text editor.Edit the lines in
LOCAL_SRC_FILES
to read as follows:LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/GameLayer.cpp
Follow the instructions from the
HelloWorld
andAirHockey
examples to import the game into Eclipse.Save it and run your application. This time, you can try out different size screens if you have the devices.
You just ran a universal app in Android. And nothing could have been simpler.
As a bonus, I've added another version of the game with an extra type of enemy to deal with: a UFO hell-bent on zapping the city! You may find this in 4198_04_BONUS_PROJECT.zip
.