O'Reilly logo

Android High Performance Programming by Diego Grancini, Enrique López Mañas

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

Creating our first HelloWorld-JNI

Let´s create a project with Android Studio with a minimal setup. In order to do so, navigate to Project | New | New Project. Create the most minimalistic setup available—typically just a project; do not add Activity from the beginning. This adds a lot of boilerplate code that we do not need at this moment. When the project has been created, add a new Activity by right-clicking on your source folder, and clicking on New | Java Class. Name the class Main Activity:

Creating our first HelloWorld-JNI

When the file has been created, add this very basic code for Activity:

public class MainActivity extends Activity { @Override protected void onCreate(Bundle ...

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