referencing a prebuilt Java library from Android.mk

102 views
Skip to first unread message

Koush

unread,
Dec 28, 2009, 2:56:22 PM12/28/09
to android-platform
Hi, suppose I have a prebuilt Java library "com.test.foo.jar" and I
want to reference it from an APK built via the Android framework. What
should the Android.mk look like for "com.test.foo.jar"?

Here is what I have for the jar currently:
------
LOCAL_PATH := $(my-dir)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libfoo:com.test.foo.jar
include $(BUILD_MULTI_PREBUILT)

And then for the APK:
------
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := libfoo
LOCAL_MODULE_TAGS := user
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_PACKAGE_NAME := Bar
include $(BUILD_PACKAGE)

But I am still getting missing package errors and such while building.
Any suggestions/advice would be helpful!

Thanks,

Koush

Reply all
Reply to author
Forward
0 new messages