Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

How to Develop Native Android* Applications with Intel® INDE 2015 Eclipse* Integration

$
0
0

Introduction

This tutorial will guide you through Intel® INDE 2015 installation and demonstrate how to develop native Android* applications that target either x86 based or ARM based processors.

About Intel® INDE

Intel® Integrated Native Developer Experience (Intel® INDE) is a productivity suite of C++ and Java tools and libraries that speed development of mobile and PC applications through code reuse and integrated workflow support. Intel INDE enables creation of Windows applications on Intel® Architecture and Android applications on ARM and Intel® Architecture. Developers have the freedom to use Intel INDE within the IDE they prefer, including Microsoft Visual Studio, Google Android Studio, and Eclipse. Intel INDE also provides developers access to advanced platform capabilities like media acceleration, context sensing, OpenCL 2.0, and threading libraries, with a selection of compilers, analyzers and debugging tools. Intel INDE is available immediately in three editions: Starter, Professional and Ultimate. For additional information, view the Intel INDE announcement blog in the Intel® Developer Zone.

Prerequisites

Do not install Eclipse prior to running this tutorial. Intel® INDE 2015 will install the right version of Eclipse for you.

You do need to install JDK8– INDE requires a 64-bit version when using Eclipse*.

Installation

Start Intel® INDE 2015 installation, select Evaluate Ultimate Edition option and click Next (note that you can also choose Install Starter Edition Option).

Select Eclipse* Development Environment option and click Next.

Which IDE would you like to integrate with?

Choosing this option will download and install all the necessary tools, including Eclipse* itself, the Eclipse Plugins for Intel® INDE, Android Development Tools, Android NDK, and other relevant tools.

Creating Your First Native Android Application with INDE

Start Eclipse for Android ADT located in C:\Intel\INDE\IDEintegration\ADT\eclipse and select the desired workspace location:

Workspace Launcher

From the File menu, select New/Intel x86 Native Android Project:

Intel x86 Native Android Project

Type in Application Name and choose Preferred SDK Options (Please select API 19: Android 4.4 (KitKat) as a Target SDK and Google APIs (x86 System Image) (Google Inc.) (API 19) as a Compile With option):

New Android Application

Name the native library:

Add Android Native Support

Continue running the wizard and choose default options:

Configure Project

Configure Launcher Icon:

Configure Launcher Icon

Select the layout of your application (Activity):

Create Activity

Type in Activity Name:

Blank Activity

Make sure that you point to the correct version of the NDK (Native Development Kit) by selecting Window/Preferences from the menu and under Android select NDK and make sure that NDK location points to C:\Intel\INDE\IDEintegration\NDK32

Android NDK Preferences

Build your project by selecting Project/Build All (Ctrl+B):

Resulting Project

You should see the following in the Console Window:

**** Build of configuration Default for project HelloINDE_x86 ****

C:\Intel\INDE\IDEintegration\NDK32\ndk-build.cmd all
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml   
[x86] Compile++ x86  : HelloINDE_x86 <= HelloINDE_x86.cpp
[x86] StaticLibrary  : libstdc++.a
xiar: executing 'C:/Intel/INDE/IDEintegration/NDK32/toolchains/x86-4.8/prebuilt/windows/bin/i686-linux-android-ar.exe'
[x86] SharedLibrary  : libHelloINDE_x86.so
[x86] Install        : libHelloINDE_x86.so => libs/x86/libHelloINDE_x86.so

**** Build Finished ****

Prior to running your application, select Run/Run Configurations from the menu, click on New Launch Configuration button (the first button), enter the name of your configuration and select the project.

Android Run Configurations

Select the Target Tab and make sure that Intel_Nexus_7_x86 is selected as a target, hit Apply and Run buttons:

Deployment Target Selection Mode

After the simulator starts up and you login you should see your application up and running:

HelloINDE_x86 App Running on Intel_Nexus_7_x86 device

Creating Your First ARM Android Application with INDE

To create a native Android application, select File/New/Android Application Project from the main menu:

Android Application Project

Type the name of your application and modify the package name:

New Android Application for ARM

Configure the project (you can use defaults provided by the wizard):

HelloINDE Configure Project

Configure Launcher Icon:

Configure Launcher Icon

Select the layout of your application (Activity):

Create Activity

Provide the Activity Name:

HelloINDE Activity Name

You should see the following created for you by the application wizard:

HelloINDE project

Prior to running your application, select Run/Run Configurations from the menu, click on New Launch Configuration button (the first button), enter the name of your configuration and select the project.

HelloINDE Run Configuration

Select the Target tab and select the ARM device as your preferred target, hit Apply and Run buttons:

Select Android Virtual Device

After the simulator startup you should see the following:

HelloINDE App Running on ARM

You can now target ARM or x86 devices using Intel® INDE 2015!


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>