0

I`m trying to build and launch android ndk samples, on version ndk-r10b - it is important, because on older version ndk-r9c i launch android application samples with success(without any errors).

for building i use "ndk-build" command in the folder with sample, for example "samples/native-codec/"

on version "ndk-r10b" i get next error message:

"Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: Android.mk
/home/user/android-ndk-r10b/build/core/add-application.mk:209: *** Android NDK: Aborting... . Stop."

how can i fix it? any useful information will be needed.

Maksym
  • 41
  • 7

1 Answers1

0

The error clearly says that Android.mk file was not found in the directory you are trying to build. Try to open terminal in the directory having the "jni" folder and then do a ndk-build. It should compile. If it still doesn't then perhaps your jni folder might not be having an Android.mk in which case you will have to write one yourself.

  • simpliest sample named "hello-jni" was builded successfull with ndk-build command, but i very need to look how works "native/codec" sample and i take error msg showed is SO question. Maybe it`s problem relates with version of newest android used in this sample? Because in Application.mk file we have "APP_PLATFORM := android-L". – Maksym Oct 08 '14 at 06:59
  • ervikaspec, thanks, but i try to ndk-build in folder /jni and i have errors for any included headers like: "/native-codec-jni.cpp:27:20: fatal error: assert.h: No such file or directory compilation terminated." – Maksym Oct 08 '14 at 07:02
  • Hi, let me check at my side. I will let you know – Vikas Malhotra Oct 08 '14 at 07:04
  • I can`t change files in the ndk directories. and directory .../jni/ has Android.mk file. – Maksym Oct 08 '14 at 07:04
  • Don't do ndk-build inside the jni folder, come outside the jni folder and then do ndk-build. I think you have not added your ndk folder to the PATH variable and thats why its not picking up assert.h from sources. Add following lines to your Android.mk file where you have added .cpp files: NDK_PLATFORMS_ROOT := /home/ace/Documents/Android/ndk/platforms TARGET_PLATFORM := android-19 LOCAL_C_INCLUDES:= \ $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/include \ – Vikas Malhotra Oct 08 '14 at 07:10
  • thanks ervikaspec, but this lines can`t help. also appears error about APP_BUILD_SCRIPT... usally all samples was running succefull, but in r10b i don`t know what is my mistake – Maksym Oct 08 '14 at 07:43
  • Current errors not appears if load ndk for Platform (64-bit target) – Maksym Oct 08 '14 at 13:09
  • Then this could be an ndk only issue. – Vikas Malhotra Oct 08 '14 at 13:37