Building executable for android -


i trying build hello world executable android. test.c:

#include <stdio.h> #include <stdlib.h> int main() {      printf("hello world\n");      return 0; } 

my android.mk:

local_path := $(call my-dir) include $(clear_vars)  # give module name local_module    := hello_world   # list c files compile local_src_files := test.c # option build executables instead of building library android application. include $(build_executable) 

my application.mk:

app_abi := 

i ran ndk-build , got 7 executables each in individual directory in libs - arm64-v8a armeabi armeabi-v7a mips mips64 x86 x86_64 when ran file command, got

hello_world: elf 32-bit lsb  executable, arm, eabi5 version 1 (sysv), dynamically linked (uses shared libs), stripped 

but when pushed adb shell , execute it, error:

not executable: magic 7f45. 

what should working?

ndk stands native development kit. term used in refer tools used interface platform independent code, eg: java, native code.

in android context ndk refers tools used interface android java code native code.

in cases interfacing consist of platform independent code calling library of kind.

thus ndk-build used android.mk file has library flags, eg: local_module, , generate libraries since suited purpose.

for static executable you're going have use this toolset more directly bona fida make file.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -