Ubuntu18.04报错:dex2oatd F dex2oat did not finish after 2850 seconds

1.build/core/dex_preopt_libart.mk
@@ -108,10 +108,14 @@ endif
 # $(1): the input .jar or .apk file
 # $(2): the output .odex file

+SINGLE_THREAD := "-j1"
 
 define dex2oat-one-file
 $(hide) rm -f $(2)
 $(hide) mkdir -p $(dir $(2))
 $(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) \
+       $(SINGLE_THREAD) \
        --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
        --runtime-arg -classpath --runtime-arg $(DEX2OAT_CLASSPATH) \
        --boot-image=$(PRIVATE_DEX_PREOPT_IMAGE_LOCATION) \


2.build/core/dex_preopt_libart_boot.mk
@@ -51,6 +51,9 @@ $($(my_2nd_arch_prefix)LIBART_TARGET_BOOT_ART_EXTRA_INSTALLED_FILES) : $($(my_2n
        $(hide) $(ACP) -fp $(dir $<)$(notdir $@) $@
 $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)

+ SINGLE_THREAD := "-j1"


 # Use dex2oat debug version for better error reporting
 $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGET_BOOT_DEX_FILES) $(DEX2OAT_DEPENDENCY)
        @echo "target dex2oat: $@"
@@ -59,7 +62,7 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
        @rm -f $(dir $@)/*.art $(dir $@)/*.oat
        @rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.art
        @rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.oat
-       $(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
+       $(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) $(SINGLE_THREAD) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
                --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
                --image-classes=$(PRELOADED_CLASSES) \
                $(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \

 

你可能感兴趣的:(Win10,WSL使用)