Game Development Reference
In-Depth Information
nardone@NARDONE3$ ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Now you have configured all you need and can start creating the Android NDK project.
Creating the Android Project with Native Support
Now you'll create a simple Android project to apply the concepts you learned in the previous
section. The project consists of the following components:
An Android activity : This is the main entry point for the application. Its
job is to load a native library and call a C function optionally sending an
array of strings as arguments.
A native library : This library implements a simple C log function to
extract a string argument from the Java activity and print the message
to the Android log console.
Now, let's create the project for this section.
1.
In Eclipse, click the New Android Project icon on the main toolbar or
press CTRL-N and select Android ➤ Android project. This opens the
New Android Project dialog box.
2.
In the dialog box, enter a project name ( ch02.Project in this
example).
3.
Enter an application name ( ch02.Project in this example).
4.
Enter a package name ( ch02.project in this example).
5.
Enter an activity name ( ProjectActivity in this example).
6.
Specify a minimum SDK version can be 4.4 API 19 in this example
but I use the Android 5.0.1 API 21 as Target SDK. Figure 2-2 shows
the completed New Android Application dialog box for this example.
7.
Click Finish.
 
Search WWH ::




Custom Search