<> Hello ! This is Kite blog ,

<> Welcome to communicate with me .

habit Linux People of , In the beginning Android When , Will think :
Can it be like that Linux equally , adopt arm-linux-gcc -o test test.c
Compile an executable program into the Android How about running in the environment ?
Yes, of course , By writing Android.mk realization .

* 1. get into hardware Under the table of contents , Create a directory in it , Like what I used aw The board of : cd ./hardware/aw/sensors/ mkdir demo
&& cd demo
* 2. Write your own C/C++ file , I use it :test.c #include <stdio.h> int main() { printf("Android
test success\n"); return 0; }
* 3. stay demo Below the table of contents , Copy from other directories Android.mk, to write Android.mk file : LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS) LOCAL_MODULE := test LOCAL_SRC_FILES := test.c
LOCAL_MODULE_TAGS := optional #LOCAL_C_INCLUDES := #LOCAL_STATIC_LIBRARIES :=
#LOCAL_SHARED_LIBRARIES := include $(BUILD_EXECUTABLE)
BUILD_EXECUTABLE Indicates that the compiled is an executable binary

* 4.mm Compile current path
After successful compilation , The executable file is saved in :
out/target/product/xxxxx/system/bin/
route , The name is LOCAL_MODULE Name to fill in , In this case LOCAL_MODULE by test

This will file the push reach Android lower , Giving executive authority , You can test it .

Technology
©2019-2020 Toolsou All rights reserved,
One is called “ Asking for the train ” A small village Finally got the train Spring Boot Lesson 16 :SpringBoot Implementation of multithreading with injection class Chrome OS, For programmers and Windows What does it mean ? Internet Marketing JAVA Convert a string to a numeric type I've been drinking soft water for three years ? What is the use of soft water and water softener You don't know ——HarmonyOS Talking about uni-app Page value transfer problem JavaScript Medium Call and ApplySparkSQL Achieve partition overlay write Character recognition technology of vehicle license plate based on Neural Network