gpt4 book ai didi

java - 为什么 Android aosp 中没有构建 JAVA 库?

转载 作者:行者123 更新时间:2023-12-01 19:12:17 26 4
gpt4 key购买 nike

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但我仍然遇到同样的错误。

Cmdwrapper 存在于 MonitorService/userlibs/CmdWrapper.jar

最佳答案

您应该预先构建 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)

关于java - 为什么 Android aosp 中没有构建 JAVA 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59464139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com