Monday, March 4, 2013

Day 1 Project Setup

Setup Android

After many trials (Juno/NVIDIA/Intellij/...) it ends up that the easiest way to debug a NDK application is to use the 'standard' tools preconised by Google.

Download/Install the ADT Bundle for Mac

http://developer.android.com/sdk/index.html

figure 1

Download/Install the NDK for Mac

http://developer.android.com/tools/sdk/ndk/index.html

figure 1
I personnaly installed it in Applications/Android/ so I end up with something like this :

figure 1

Configure Eclipse

You need to tell Eclipse where you NDK is located. Go to ADT/Preferences/Android/NDK and indicate the NDK location (in my case Application/Android/android-ndk-r8d)

figure 1

Prepare the android Emulator.

We are going to make use of OpenGL so we need the emulator to be as fast as possible. Here are the steps needed to have a useable emulator.

Install the Intel Virtualization Tool

http://software.intel.com/en-us/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-mac-os-x

The installation procedure is very well explained so just follows the instructions ;-)

Create a "good" AVD
  • with an x86 image
  • with Host GPU

For this we need to launch the Android SDK Manager (Directly from the ADT Menus(Window/Android SDK Manager)) or from the finder /sdk/tools/android. and install the X86 image corresponding to your SDK.

figure 1
and then we need to create the AVD itself.For this we need to launch the Android Virtual Device Manager (Directly from the ADT Menus(Window/Android Virtual Device Manager)) or from the finder /sdk/tools/android. and then choose from menus Tools/Manage AVDs.

There are 2 points to care about :

  • Choose an X86 image
  • Check the Use Host GPU Option

figure 1

Note for later (Don't worry if you don't understand everything)

when we will create a JNI libray. We need to build an X86 version of the library also. This is very easy to do. You just need to add the x86 target in the APP_ABI variable (in Application.mk)

Application.mk

APP_ABI := armeabi armeabi-v7a x86
APP_PLATFORM := android-4

Setup IOS/OSX

Concerning IOS and OSX, you just have to download the latest XCode from the AppStore.

No comments:

Post a Comment