diff --git a/core/dpi_specific_apk.mk b/core/dpi_specific_apk.mk index 0e8cbdf91c..06e498d8a8 100644 --- a/core/dpi_specific_apk.mk +++ b/core/dpi_specific_apk.mk @@ -47,7 +47,10 @@ $(built_dpi_apk) : $(all_res_assets) $(jni_shared_libraries) $(full_android_mani ifneq ($(jni_shared_libraries),) $(add-jni-shared-libs-to-package) endif -ifneq ($(full_classes_jar),) +ifeq ($(full_classes_jar),) +# We don't build jar, need to add the Java resources here. + $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@)) +else $(add-dex-to-package) endif $(add-carried-java-resources) diff --git a/core/package_internal.mk b/core/package_internal.mk index e389b04199..5dac455e6e 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -396,7 +396,10 @@ $(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_ ifneq ($(jni_shared_libraries),) $(add-jni-shared-libs-to-package) endif -ifneq ($(full_classes_jar),) +ifeq ($(full_classes_jar),) +# We don't build jar, need to add the Java resources here. + $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@)) +else $(add-dex-to-package) endif $(sign-package)