为什么JAVA库不在android aosp中构建?

问题描述 投票:0回答:1
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES += \
    moniserv-flairclient \
    moniserv-gson

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    src/co/IMonitorService.aidl \
    src/co/IMonitorServiceCallback.aidl

LOCAL_PACKAGE_NAME := MonitorService
LOCAL_CERTIFICATE := platform
LOCAL_PRIVATE_PLATFORM_APIS :=true

LOCAL_JNI_SHARED_LIBRARIES := libandroid_main_jni_monitor
LOCAL_JAVA_LIBRARIES += \
    CmdWrapper

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_PACKAGE)

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

以上内容实际上存在于MonitorService / Android.mk文件中。

当我给出mm时,会引发错误,

    MonitorService/Android.mk was modified, regenerating...
    ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/CmdWrapper_intermediates/classes-header.jar', needed by 'out/target/common/obj/APPS/MonitorService_intermediates/classes-full-debug.jar', missing and no known rule to make it


even in android_build/

我给了make框架,然后用mm执行MonitorService但我仍然遇到相同的错误。

MonitorService/userlibs/CmdWrapper.jar中存在Cmdwrapper

java android makefile jar android-source
1个回答
0
投票

您应该预先构建CmdWrapper。这是一个示例:http://androidxref.com/9.0.0_r3/xref/packages/apps/Dialer/Android.mk#418

include $(CLEAR_VARS)

LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE := dialer-zxing-target
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := ../../../external/zxing/core/core.jar
LOCAL_UNINSTALLABLE_MODULE := true

include $(BUILD_PREBUILT)
© www.soinside.com 2019 - 2024. All rights reserved.