• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • Last Modified:

How to specify the path to a file in make file

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.
1 Solution
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
Sreejith22Author Commented:
Android uses this, so while developing android apps, there is no other go :-(
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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Duncan RoeSoftware DeveloperCommented:
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.
Sreejith22Author Commented:
sorry, I am not a make expert. All what I do for is , run the script attached here with the following command --
./miyabuild.sh DL10 androidu

Open in new window

Please advise
Duncan RoeSoftware DeveloperCommented:
I changed that script to alter the make commands as outlined previously. Please run it
./miyabuild-new.sh DL10 androidu 2>&1 | tee hee

Open in new window

Post hee
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now