###################################### # Compile resource with AAPT2 # Input variables: # - full_android_manifest # - my_res_resources # - my_overlay_resources # - my_compiled_res_base_dir # - my_asset_dirs # - my_full_asset_paths # - my_res_package # - R_file_stamp # - proguard_options_file # - my_generated_res_dirs: Resources generated during the build process and we have to compile them in a single run of aapt2. # - my_generated_res_dirs_deps: the dependency to use for my_generated_res_dirs. # - my_generated_res_zips: Zip files containing resources # - my_apk_split_configs: The configurations for which to generate splits. # - built_apk_splits: The paths where AAPT should generate the splits. # # Output variables: # - my_res_resources_flat # - my_overlay_resources_flat # - my_generated_resources_flata # ######################################
# Compile all the resource files.
my_res_resources_flat := \
$(foreach r, $(my_res_resources),\
$(eval o := $(call aapt2-compiled-resource-out-file,$(r),$(my_compiled_res_base_dir)))\
$(eval $(call aapt2-compile-one-resource-file-rule,$(r),$(o)))\
$(o))
# Always set --pseudo-localize, it will be stripped out later for release # builds that don't want it.
$(my_res_resources_flat) $(my_overlay_resources_flat) $(my_resources_flata) $(my_generated_resources_flata) $(my_zippped_resources_flata): \
PRIVATE_AAPT2_CFLAGS := --pseudo-localize $(filter --legacy,$(LOCAL_AAPT_FLAGS))
# TODO(b/78447299): Forbid LOCAL_STATIC_JAVA_AAR_LIBRARIES in aapt2 and remove # support for it.
my_static_library_resources := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/package-res.apk)
my_static_library_transitive_resource_packages_lists := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/transitive-res-packages)
my_static_library_extra_packages := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/extra_packages)
my_shared_library_resources := $(foreach l, $(LOCAL_SHARED_ANDROID_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/package-res.apk)
ifneq ($(my_apk_split_configs),) # Join the Split APK paths with their configuration, separated by a ':'.
$(my_res_package): PRIVATE_AAPT_FLAGS += $(addprefix --split ,$(join $(built_apk_splits),$(addprefix :,$(my_apk_split_configs)))) endif
resource_export_package :=
ifdef LOCAL_EXPORT_PACKAGE_RESOURCES # Put this module's resources into a PRODUCT-agnositc package that # other packages can use to build their own PRODUCT-agnostic R.java (etc.) # files.
resource_export_package := $(intermediates.COMMON)/package-export.apk
$(my_res_package): PRIVATE_RESOURCE_EXPORT_PACKAGE := $(resource_export_package)
$(my_res_package): .KATI_IMPLICIT_OUTPUTS += $(resource_export_package) endif
# Clear inputs only used in this file, so that they're not re-used during the next build
my_res_resources :=
my_overlay_resources :=
my_compiled_res_base_dir :=
my_asset_dirs :=
my_full_asset_paths :=
my_apk_split_configs :=
my_generated_res_dirs :=
my_generated_res_dirs_deps :=
my_generated_res_zips :=
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.