Beginning Android App/Game Development on Windows
Before a person or a team can start developing an Android app or game, they will need certain tools, such as an IDE, a compiler and an Android device emulator. There are more steps than just running through an installation script, because there are many tools and resources needed that are produced by vendors, other than Android. Android has tried to solve this with their development of Android Studio. However, it (currently) falls short, lacking (complete) features to support “native” development and debugging that is required for serious app/game development.
Note the installation paths of the listed software installs, below. The paths will be used for setting up the environment variables, later.
Java Development Kit
The fist step is the installation of the Java Development Kit (JDK). The JDK is used to support the programming of Java which is the main programming language for Android development. Java is an interpreted language and is great for the development of simple apps and games for the Android. Interpreted languages are known for their portability from one system to another without the need to recompile the source-code. This is a nice feature, because the same intermediate build can be used within a Mac operating system (OS) and a Windows OS (and in theory an Android OS) without having to be recompiled. However, the trade is, interpreted languages tend to be slower and have indirect access to the hardware.
Android Studio, Android SDK and Android Virtual Device
The second step is the installation of Android Studio and Android’s software development kit (SDK) and virtual device. Android Studio is Android’s interactive development environment (IDE). The IDE is a software interface to the developer that is used for making Android apps using the Java programming language. The Android SDK, is a set of libraries and application programming interfaces (APIs) that allow an app to interface with an Android device resources and hardware, as well as build the application through Android Studio. While, the Android Virtual Device is a set of emulators that will allow the testing of developed apps on various Android emulated devices.
The third step is the installation of the Android Native Development Kit. The NDK contains the development support for C/C++ programming which is required for efficient execution of an app/game and direct access to the hardware, through the hardware’s Application Programming Interface (API). One of the nicest features of using the NDK is the reuse or portability of C/C++ code from one platform to another. For example, most of the C++ development work used within the development of RG’s game engine (Lt. George) can be ported from a Windows project to an Android project and then recompiled for the platform.
The fourth step is the installation of Cygwin. Cygwin is “a large collection GNU and Open Source tools which provide functionality similar to a Linux distribution on” a Windows platform. Cygwin is installed as “a DLL (cygwin1.dll) which provides substantial POSIX API functionality” and calls. Cygwin is not required to develop Android apps and/or games. However, it is recommended, because it is required within a Window’s environment to run ndk-gdb which is the GNU debugger for the Android NDK.When prompted by the installer, install from internet and download the packages from the categories Devel and Shells. To install the packages perform a left mouse click on the word “default” and the word will change to “Install”.
Setup the relating Windows Environment Variables
The fifth step is setting up the Windows Environment Variables.
To create the variables click on Windows Start Menu
- Within the “Search programs and files” text box; type “Edit the system environment variables” and hit enter, to bring up the System Properties dialog.
- On the Advanced tab click the button “Environment Variables…”.
- Click the New button, under the title System variables, to create a system variable that points to the installation directory of Cygwin, named CYGWIN_HOME.
- Click the New button, under the title System variables, to create a system variable that points to the installation director of the JDK, named JDK_HOME.
- Click the New button, under the title System variables, to create a system variable that points to the installation director of the Android SDK, named ANDROID_SDK.
- Click the New button, under the title System variables, to create a system variable that points to the installation director of the Android NDK, named ANDROID_NDK.
- Prepend %CYGWIN_HOME%\bin;%JDK_HOME%\bin;%ANDROID_SDK%\tools;%ANDROID_SDK%\platform-tools;%ANDROID_NDK%;, at the beginning of the PATH environment variable.
Eclipse IDE for Java
The sixth step is the installation of the Eclipse IDE for Java. The IDE will be used for both development in Java and C/C++ programming languages, where Android Studio can (currently) only support Java programming. The Eclipse IDE is not only used for Android development, but for many other platforms with many other programming languages. The IDE is built around the plug-in play concept where the “approved” plug-ins are under supervised management, but developed by a worldwide software community.
Download Eclipse C/C++ Libraries
The seventh step is the installation of the Eclipse C/C++ libraries through the Available Software dialog. The dialog is brought up by going to the file menu in the Eclipse IDE and clicking on the drop down menu Help and then selecting Install New Software…. In the “Work with” combo-box and select the item containing the Eclipse version (Mars for example); and then check the “Show only software applicable to target environment” checkbox. Within the plug-in tree find Programming Languages and check all C/C++ plugins and then continue on with the install.
Download Andmore – a branch of Android Development Tools (ADT)
The eighth step is the installation of the Eclipse Andmore project. Andmore is a maintained branch of the Android Development Tools (ADT), that is managed by Eclipse. Originally, the ADT was developed by Android to work with Eclipse, but with the development of Android Studio Android did not need to maintain support – this is where the Eclipse development team stepped up.To download Andmore, go to the Eclipse Marketplace, which can be found under the Eclipse file menu option Help. Within the Search tab and in the “Find:” textbox type Andmore and click the Go button within the tab. A generated list of Andmore related products will appear. Within the generated list download the “Andmore: Development Tools for Android”.
Configuring Eclipse with the Android NDK
The ninth step is configuring Eclipse with the Android NDK. Start by clicking on the file menu option ‘Window’ and then ‘Preferences’, in Eclipse. Within the Preferences tree expand the Android branch and select the NDK option. Within the dialog set the NDK Location to the NDK install path + “\build” directory.
Android Tools and Plug-ins
The tenth and final step is the installation of the Android tools and plug-ins. Through Windows Explorer, navigate to the directory where the Android SDK was installed. Execute ‘SDK Manager.exe’ and click on the “Select New” filter at the bottom of the dialog, unselect the “preview” checkboxes and then click the button “Install # Packages…”.
After the above steps are completed then a Windows platform is setup for Android development. There are additional pieces of software that are not required for Android development, but can make development easier, especially for a team of developers — software such as Gimp, Dia, Git, Meld and Mylyn. However, after completing this tutorial there is perhaps an eagerness to try out the environment. Some of RG’s recommended tutorials to try out the development environment are:
Please, keep your comments family friendly and respectful of each other and the author.