Пытаюсь использовать WorkManager в моем SystemApp. Мне не удалось его интегрировать.
Android .mk:
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := MySystemApp
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_TAGS := optional
LOCAL_JNI_SHARED_LIBRARIES := libloguploaderclient
LOCAL_SRC_FILES := $(call all-java-files-under, android/src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/android/res
LOCAL_STATIC_ANDROID_LIBRARIES := \
androidx.core_core \
androidx.annotation_annotation \
androidx.work_work # This line doesn't work
LOCAL_PROGUARD_FLAG_FILES := android/proguard.cfg
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SDK_VERSION := current
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28 && echo OK),OK)
# Build as a vendor module
LOCAL_PROPRIETARY_MODULE := true
endif
# Build as an Android app
include $(BUILD_PACKAGE)
Приведенная ниже часть файла mk не работает и дает кучу ошибок компиляции:
LOCAL_STATIC_ANDROID_LIBRARIES := \
androidx.core_core \
androidx.annotation_annotation \
androidx.work_work # This line doesn't work
Итак, как я могу использовать WorkManager в AOSP?