Android NDK



On Mon, Sep 6, 2010 at 11:34 AM, alan <al...@birtles.org.uk> wrote:
> I've just updated all our files to use __ANDROID__ instead of ANDROID
> and am having the same problem as the above user that __ANDROID__
> doesn't seem to be defined (I am using the crystax build if that makes
> any difference)

It doesn't seemed to be defined in the official NDK either...

I ran into this when I was playing with OGRE and same result. I had to
define __ANDROID__ myself.

Android Ndk Tutorial

Android NDK
> On Sep 6, 1:18 pm, Peter <peterholtw...@gmail.com> wrote:
>> Well, I tested it and now I'm confused, because without any flags
>> defined this _doesn't_ fail:
>>
>> #if defined(__ANDROID__)
>> bla i = 5;
>> #endif
>>
>> And if I print the build-in definitions using:
>> echo | arm-eabi-g++ -E -dM -
>>
>> there is nothing defining __ANDROID__ (using NDK r4b).
>>
>> So it's necessary to define it in the CMakeLists.txt?
>>
>> On 6 Sep., 10:08, David Turner <di...@android.com> wrote:
>>
>> > Yes, __ANDROID__ is defined by GCC
>>
>>
>

Android Ndk Samples

> --
> You received this message because you are subscribed to the Google Groups 'android-ndk' group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to andro...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>
>

Android NDK is a companion tool of Android SDK that allows us to use native code C/C in our development. To use NDK tools, ensure that the following two highlighted tools are downloaded from the SDK Manager.

Android NDK

Android Ndk Path

  • The latest NDK for Android, version r21, now available in beta, brings a number of significant changes, including Fortify being enabled by default, and newer versions of GNU Make and GDB.
  • NDK or Native Development Kit is a toolset that is provided by Android to use C or C code in our Android application. So, if you are using Android Studio version 2.2 or higher then you can use C or C in your Android application.