I am adding an app as part of my android build. The app make use of android-support-v4.jar. So I put the jar file inside libs folder of my application and make a reference to it from the Android.mk file of the application as shown.
include $(BUILD_PACKAGE)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libs/android-support-v4.jar
include $(BUILD_MULTI_PREBUILT)
On compiling the source code, I get the following error:
build/core/base_rules.mk:170: *** packages/apps/Personalization: MODULE.TARGET.JAVA_LIBRARIES.android-support-v4 already defined by frameworks/support/v4. Stop.
DDK build start.
error: build_android
build/core/base_rules.mk:170: *** packages/apps/Personalization: MODULE.TARGET.JAVA_LIBRARIES.android-support-v4 already defined by frameworks/support/v4. Stop.
DDK build start.
error: build_android
Can someone please let me know what need to be done such that, I can get rid of this error and get my build to work ok
UPDATE
My complete Android.mk file
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
LOCAL_PACKAGE_NAME := Personalization
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libs/android-support-v4.jar
include $(BUILD_MULTI_PREBUILT)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4
This should work. Put it anywhere before include $(BUILD_PACKAGE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With