[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • 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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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