mk错误:MODULE.TARGET.JAVA_LIBRARIE

2019-09-26  本文已影响0人  duoduo7628

错误:

v8a -marm -mfloat-abi=softfp -mfpu=neon -fopenmp
build/core/binary.mk:1192: Umix6/apps/writepen/jni/PenWriteNative/Android.mk: libPenWriteNative: Unused source files: LOCAL_CFLAGS := -O3 -DHAVE_NEON=1 -march=armv7-a arm64-v8a -marm -mfloat-abi=softfp -mfpu=neon -fopenmp
Umix6/apps/writepen/jni/freeStylus_android50/Android.mk:63: Umix6/apps/writepen/jni/freeStylus_android50
Umix6/apps/writepen/jni/freeStylus_android50/Android.mk:64: out/target/product/ble6797_6m_n/Umix6/system
build/core/base_rules.mk:183: *** Umix6/library/yxp_src/aispeechexternjar: MODULE.TARGET.JAVA_LIBRARIES.aispeechexternlib already defined by Umix6/apps/avteach/aispeechexternjar.
make: *** [out/build-full_ble6797_6m_n-mmm-Umix6_Android.mk.ninja] 错误 1
make:离开目录“/data/umix6_sdk”

错误非常明显,在编译aispeechexternjar工程时,MODULE.TARGET.JAVA_LIBRARIES.aispeechexternlib 变量 已经定义在avteach 工程中了。

错误解决:

aispeechexternjar工程这个变量换个名字,或者avteach工程这个变量换个名字。

但是以avteach换个名字时,发现这个mk没有问题。

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_JAVA_LIBRARIES := com.noahedu ucache
LOCAL_STATIC_JAVA_LIBRARIES :=aispeechexternlib \
javacsv\
                            android-support-v4-haidian \
                            volly-haidianvideo \
                            exoplayer-haidainvideo \
                            org.apache.http.legacy
                            
LOCAL_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages com.noahedu.aispeechexternjar
    
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
        src/com/noahedu/Recommend/monitor/IRecommendAidlService.aidl
        
LOCAL_PACKAGE_NAME := HaiDian
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)

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

注意:那就说明avteach工程其他地方定义了aispeechexternlib变量 。需查看工程下其他mk文件。

image.png

经查看 果然moduleaispeechexternjar上传了mk,下面为moduleaispeechexternjar的mk。

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
         src/com/noahedu/aispeechexternjar/intern/aidl/IAiSpeechListener.aidl \
         src/com/noahedu/aispeechexternjar/intern/aidl/IAiSpeechManagerIntern.aidl

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_MODULE := aispeechexternlib
LOCAL_STATIC_JAVA_LIBRARIES := aispeech_litlib
LOCAL_JAVA_LIBRARIES := com.noahedu
include $(BUILD_STATIC_JAVA_LIBRARY)

include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := aispeech_litlib:libs/litlib.jar
include $(BUILD_MULTI_PREBUILT)

删除此mk编译就没问题了。
include $(call all-makefiles-under,$(LOCAL_PATH))去掉mk 这一句也可以,但是可能会产生其他问题,不推荐

上一篇下一篇

猜你喜欢

热点阅读