Include 3rd party code to APK


Last Updated:

  1. isup

    isup Member This Topic's Starter

    Joined:
    Jul 9, 2009
    Messages:
    20
    Likes Received:
    0
    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?
     

    Advertisement
  2. isup

    isup Member This Topic's Starter

    Joined:
    Jul 9, 2009
    Messages:
    20
    Likes Received:
    0
    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))
     

Share This Page

Loading...