• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Include 3rd party code to APK

isup

Newbie
Is anyone here familiar with Android make system? I have a Java application
which uses the 3rd party library jar. It can be built to an APK file by
either Eclipse or Linux system. The difference is the one built by Eclipse has the 3rd
party code in the APK package but the one built by Linux does not.

How can I add the 3rd party code to the build in Linux by modifing makefile?
 
Below is my makefile. The generated APK file does not include the classes from Third_party_2.5.jar, even though the build succeeds. The application does not work after the APK is loaded. Any suggestion?

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := libabc
LOCAL_MODULE_TAGS := eng development
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := ABC_app
include $(BUILD_PACKAGE)
###############################
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libabc:lib/Third_party_2.5.jar
include $(BUILD_MULTI_PREBUILT)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
 
Back
Top Bottom