Hi all,
      I want to add my own API's to android.
      For this thing I followed one document I got from net and according to
I added one directory called "abc" to android framework which contains three
sub directories "java", "jni"  and "libabc".

When I tried to build the source code with this added directory I got
following error:
make: *** No rule to make target
`out/target/product/generic/obj/STATIC_LIBRARIES/�_intermediates/�.a',
needed by
`out/target/product/generic/obj/SHARED_LIBRARIES/libabc_jni_intermediates/LINKED/libabc_jni.so'.
Stop.

Then I checked the libabc_jni_intermediate directory and found that LINKED
directory is missing....

The content of all this "java" directory is
"abc.java" class file
 package android.abc;

public class abc
{
 static
 {
  System.loadLibrary("abc_jni");
 }
 public native int print(int i);
 public abc()
 {
    //test
 }
}

The content of "jni" directory is one "android_abc_abc.cpp" which contains
jni layer for accesing native function.
and "Android.mk" file. The content of "Android.mk" is as given below.


ifneq ($(BUILD_WITHOUT_PV),true)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
 android_abc_abc.cpp

LOCAL_SHARED_LIBRARIES := \
 libopencoreplayer \
 libopencoreauthor \
 libandroid_runtime \
 libnativehelper \


$(warning JNI makefile)

LOCAL_STATIC_LIBRARIES := \
 libabc

LOCAL_C_INCLUDES += \
 external/tremor/Tremor \
 $(PV_INCLUDES) \
 $(JNI_H_INCLUDE) \
 $(call include-path-for, corecg graphics)

LOCAL_CFLAGS +=

LOCAL_LDLIBS := -lpthread

LOCAL_MODULE:= libabc_jni
LOCAL_PRELINK_MODULE := false
$(warning JNI makefile)

include $(BUILD_SHARED_LIBRARY)
endif

And content of "libabc" directory are "test.h" and "test.cpp" file which
defines native function along with "Android.mk".
The content of "android.mk"file is

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
 test.cpp

LOCAL_SHARED_LIBRARIES := \
 libui libcutils libutils

$(warning LIBABC make file)

LOCAL_MODULE:= libabc
LOCAL_PRELINK_MODULE := false

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl
endif

ifneq ($(TARGET_SIMULATOR),true)
LOCAL_SHARED_LIBRARIES += libdl
endif

LOCAL_C_INCLUDES := \
 $(call include-path-for, graphics corecg)
$(warning LIBABC make file)

#include $(LOCAL_PATH)/abc/jni/Android.mk
#include $(BUILD_STATIC_LIBRARY)
#LOCAL_BUILT_MODULE:=libabc
include $(BUILD_STATIC_LIBRARY)

Please tell me what thing is causing error....
Or if any one knows any other way to add new API to android please share it.


Thanks in advance,
Sagar

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

Reply via email to