How to specify the path to a file in make file

Posted on 2012-08-21
Last Modified: 2014-01-27
While we compile the source code, the build breaks with the following log.

vendor/abc/libs/frameworks: MODULE.TARGET.JAVA_LIBRARIES.core.jar already defined by packages/apps/SkeletonFindme

Open in new window

From this, we understand that, the build breaks since we have added jar's which was already present in vendor/abc/libs/frameworks to our application's lib folder again. We assume, the system identifies this as possible duplication of jar's and prevents it during compilation. We are not particular about using the jar's from the lib folder of our app and we can remove the lib folder which contains these duplicate jar's. But then, we need to know, how we can access the jar's contained in vendor/abc/libs/frameworks.

It would be of help, if any of the experts can let us know what are the changes we need to make in make file, such that we can access the jar's contained in vendor/abc/libs/frameworks from our application.

Following is our make file:

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

    #LOCAL_SRC_FILES := $(call all-java-files-under, src)
    #LOCAL_PACKAGE_NAME := SkeletonFindme
    #LOCAL_CERTIFICATE := platform

    #include $(BUILD_PACKAGE)

    LOCAL_PATH:= $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_SRC_FILES := $(call all-subdir-java-files)
    LOCAL_PACKAGE_NAME := SkeletonFindme

    #LOCAL_PROGUARD_FLAGS := -include $(LOCAL_PATH)/proguard.flags


    #LOCAL_SDK_VERSION := current

    include $(BUILD_PACKAGE)

    include $(CLEAR_VARS)

    LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := core.jar:libs/core.jar \


    include $(call all-makefiles-under, $(LOCAL_PATH))

Open in new window

Any help in resolving this build issue, by correctly pointing out the modification that need to be done in the make file shown above, such that we can access the jar contained in vendor/abc/libs/frameworks would be much appreciated with points.
Question by:Sreejith22
    LVL 86

    Expert Comment

    Make files are really quite foreign to Java. Is this a normal java application? I'm wondering why make files are being used as opposed to something Java-like, e.g. Ant

    Author Comment

    Android uses this, so while developing android apps, there is no other go :-(
    LVL 51

    Expert Comment

    we need to see the rule with the command which triggerd this message
    you may try
       make -n your-target-here
    to get the commands displayed
    LVL 34

    Expert Comment

    by:Duncan Roe
    make -d (-debug) gives copious output but may point you to where your problem is. You do best to redirect or tee the output from make to a file e.g.
    make -d 2>&1 | tee hee

    Open in new window

    Search through the file hee for references to the jar files that are not being handled correctly: less is a very good utility for doing this.

    Author Comment

    sorry, I am not a make expert. All what I do for is , run the script attached here with the following command --
    ./ DL10 androidu

    Open in new window

    Please advise
    LVL 34

    Accepted Solution

    I changed that script to alter the make commands as outlined previously. Please run it
    ./ DL10 androidu 2>&1 | tee hee

    Open in new window

    Post hee

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Working settings for French ISP Orange "Prêt à Surfer" SIM cards for data connections only. Can't be found anywhere else !
    A short article about a problem I had getting the GPS LocationListener working.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now