O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a basic native activity

First, let's create DroidBlaster project:

  1. In Eclipse, create a new project Android project with the following settings:
    • Enter Eclipse project name: DroidBlaster.
    • Set Build target to Android 2.3.3.
    • Enter Application name: DroidBlaster.
    • Enter Package name: com.packtpub.droidblaster.
    • Uncheck Create Activity.
    • Set Min SDK Version to 10.
  2. Once the project is created, go to the res/layout directory and remove main.xml. This UI description file is not needed in our native application. You can also remove src directory as DroidBlaster will not contain even a piece of Java code.
  3. The application is compilable and deployable, but not runnable simply because we have not created an activity yet. Let's declare NativeActivity ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required