diff --git a/core/app_prebuilt_internal.mk b/core/app_prebuilt_internal.mk index ad96b5b54..d47930c84 100644 --- a/core/app_prebuilt_internal.mk +++ b/core/app_prebuilt_internal.mk @@ -102,6 +102,15 @@ ifndef LOCAL_ENFORCE_USES_LIBRARIES endif endif +# Disable verify_uses_libraries check if dexpreopt is globally disabled. +# Without dexpreopt the check is not necessary, and although it is good to have, +# it is difficult to maintain on non-linux build platforms where dexpreopt is +# generally disabled (the check may fail due to various unrelated reasons, such +# as a failure to get manifest from an APK). +ifneq ($(WITH_DEXPREOPT),true) + LOCAL_ENFORCE_USES_LIBRARIES := +endif + my_enforced_uses_libraries := ifdef LOCAL_ENFORCE_USES_LIBRARIES my_enforced_uses_libraries := $(intermediates.COMMON)/enforce_uses_libraries.status