Add my_clas.cpp file to frameworks/base/core/jni/Android.mk
LOCAL_SRC_FILES:= \
mydomain_mypackage_my_clas.cpp
This adds your .cpp file to platform.
For adding your MyClass.java
file to Android SDK
update Android API
file (where are described all classes, which are included in SDK
. Location of that file frameworks/base/api/current.txt
):
make update-api
Then compile your SDK for Linux platform (for example):
make PRODUCT-sdk-sdk
Your Android SDK with custom class (MyClass.java
) will be located at out/host/linux-x86/
in zip archive.
Use compiled custom Android SDK
in your favorite IDE
and easily call MyClass.java